[SPIGOT-7849] Serializing Food Item (null value in entry: using-converts-to=null) Created: 25/Jul/24 Updated: 25/Dec/24 Resolved: 25/Jul/24 |
|
| Status: | Resolved |
| Project: | Spigot |
| Component/s: | None |
| Affects Version/s: | None |
| Fix Version/s: | None |
| Type: | Bug | Priority: | Minor |
| Reporter: | TechnicallyCoded | Assignee: | Doc |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | food, serialization | ||
| Environment: |
openjdk version "21.0.3" 2024-04-16 LTS Ubuntu 22.04.3 LTS |
||
| Attachments: |
|
| Version: | CraftBukkit version 4273-Spigot-34bd42b-2c54749 (MC: 1.21) (Implementing API version 1.21-R0.1-SNAPSHOT) |
| Plugin: | SerializationTest |
| Guidelines Read: | Yes |
| Description |
|
Serializing an item using BukkitObjectOutputStream with the "can_always_eat" tag will trigger a NullPointerException. I am assuming other similar tags may cause the same issue. I provided a test plugin: simply run /serializationtest when holding an item with this tag in your hand. A plugin like ItemEdit can be used to apply this tag to the item quickly Thank you for your time ^^ |
| Comments |
| Comment by Doc [ 25/Jul/24 ] |
|
PR Created the issue is with the value of item to convert when eat being null. https://hub.spigotmc.org/stash/projects/SPIGOT/repos/craftbukkit/pull-requests/1454/overview You can test this in BuildTools with: --rev 1.21 --pr craftbukkit:1454 |