Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: some servers sent -1 for default player permission #195

Open
wants to merge 1 commit into
base: 3.0
Choose a base branch
from

Conversation

hax0r31337
Copy link
Contributor

Some servers like Mineplex sent -1 for default player permission

Caused by: java.lang.ArrayIndexOutOfBoundsException: Index -1 out of bounds for length 4
	at org.cloudburstmc.protocol.bedrock.codec.v567.serializer.StartGameSerializer_v567.readLevelSettings(StartGameSerializer_v567.java:97)
	at org.cloudburstmc.protocol.bedrock.codec.v428.serializer.StartGameSerializer_v428.deserialize(StartGameSerializer_v428.java:62)
	at org.cloudburstmc.protocol.bedrock.codec.v440.serializer.StartGameSerializer_v440.deserialize(StartGameSerializer_v440.java:23)
	at org.cloudburstmc.protocol.bedrock.codec.v527.serializer.StartGameSerializer_v527.deserialize(StartGameSerializer_v527.java:24)
	at org.cloudburstmc.protocol.bedrock.codec.v544.serializer.StartGameSerializer_v544.deserialize(StartGameSerializer_v544.java:21)
	at org.cloudburstmc.protocol.bedrock.codec.v544.serializer.StartGameSerializer_v544.deserialize(StartGameSerializer_v544.java:11)
	at org.cloudburstmc.protocol.bedrock.codec.BedrockCodec.tryDecode(BedrockCodec.java:57)
	... 89 more

@onebeastchris
Copy link
Contributor

The same issue appears to occur with authorative movement. E.g. Hive sends a value of -1, which causes a similar issue with Protocol when that's being deserialized into an enum :/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants