Uploaded image for project: 'Spigot'
  1. Spigot
  2. SPIGOT-7555

ItemMeta: HideFlags truncated to byte range

XMLWordPrintable

    • This server is running CraftBukkit version dev-Spigot-86b5dd6-752aac6 (MC: 1.20.4) (Implementing API version 1.20.4-R0.1-SNAPSHOT)
    • Yes

      The HideFlags got extended in 1.20.0 (https://hub.spigotmc.org/stash/projects/SPIGOT/repos/bukkit/commits/3a54fb167d6354b6e39f5027bcde56641f487b8f#src/main/java/org/bukkit/inventory/ItemFlag.java), but CraftMetaItem still casts the flag values from int to signed byte (max value 127) (https://hub.spigotmc.org/stash/projects/SPIGOT/repos/craftbukkit/browse/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java#880).

      One effect of this is that for example during item deserialization, ItemFlags with 255 as value will get converted to ItemFlags with 127 as value.

      I will prepare a PR to fix this.

            Unassigned Unassigned
            blablubbabc blablubbabc
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: