OvercastNetwork / SportBukkit

CraftBukkit and Bukkit modifications that improve stability and add new features
100 stars 85 forks source link

ProtocolTranslator throws NPE when DataWatcher item has no entity type set #198

Closed Pablete1234 closed 8 years ago

Pablete1234 commented 8 years ago

Sending player spawn packets with metadata for the skin flag only kicks 1.9 clients, but works just fine with 1.10 clients, server log: image

Pablete1234 commented 8 years ago

Found out the issue comes from data watcher items not having an entity type set. It would be nice to either get a constructor for DataWatcher.Item<> that includes the entity type, or try to ignore the entity type in the metadata translator if it's null, but still metadata needs to be translated (health index is 6 in 1.9 and 7 in 1.10)

jedediah commented 8 years ago

It's a mutable public field. I added an initial value.