CryptoMorin / XSeries

Library for cross-version Minecraft Bukkit support and various efficient API methods.
https://www.spigotmc.org/threads/378136/
MIT License
403 stars 126 forks source link

Fix splash potion material on old versions #232

Closed Golfing7 closed 1 year ago

Golfing7 commented 1 year ago

Pre-flattening, matchXMaterial(ItemStack) matches splash potions to the SPLASH_POTION material type. Using parseItem() then results in a null item. This update will fix that.

CryptoMorin commented 1 year ago

Instead of changing the byte to short, just add an exception inside parseItem method for splash potions.

Golfing7 commented 1 year ago

Sorry for the delay. I've edited the commit and it should be better now!

CryptoMorin commented 1 year ago

Nice, thanks!