java.lang.ClassCastException: class java.lang.Integer cannot be cast to class java.lang.Byte (java.lang.Integer and java.lang.Byte are in module java.base of loader 'bootstrap')
iBuseWinner opened this issue ยท 1 comments
Make sure you're doing the following
- You're using the latest build for your server version
- This isn't an issue caused by another plugin (Maybe by my plugin, idk)
- You've checked for duplicate issues (But to answers)
- You didn't use
/reload
Describe the question
I have 2 methods in my class to change player's equipment, but there is an error
API method(s) used
PacketContainer, PacketType.Play.Server.ENTITY_EQUIPMENT, EnumWrappers.ItemSlot, packet.getSlotStackPairLists
Expected behavior
java.lang.ClassCastException: class java.lang.Integer cannot be cast to class java.lang.Byte (java.lang.Integer and java.lang.Byte are in module java.base of loader 'bootstrap')
Exception (full): https://hastebin.com/rugiberoso.yaml
Code
https://hastebin.com/ohayoxuwon.java
Additional context
Utils.getArmorColor returns Bukkit's ItemStack
playerInfoOne.getPlayer() returns Bukkit's Player