ProtocolLib
ProtocolLib copied to clipboard
Unable to read MobEffects with Build #599
- [x] This issue is not solved in a development build
Describe the bug
When you listen to the RemoveEntityEffect packet and try to read it by packet.getEffectTypes().read(0)
, ProtocolLib fails and produces an error. I tested it on a 1.16.5 server.
This issue first appeared in Build #599
(https://ci.dmulloy2.net/job/ProtocolLib/599/) and did thus not appear in Build #598
. Therefore, the error is somewhere in commit #1869.
To Reproduce Steps to reproduce the behavior:
- Listen to RemoveEntityEffect
- Write
packet.getEffectTypes().read(0)
Expected behavior You will get the error:
FieldAccessException: Field index 0 is out of bounds for length 0
at com.comphenix.protocol.reflect.FieldAccessException.fromFormat(FieldAccessException.java:49)
at com.comphenix.protocol.reflect.StructureModifier.read(StructureModifier.java:218)
...
What server software are you using?
What server software are you using?
I would expect this to happen on Paper and Spigot, see my comment on the linked PR