-
-
Notifications
You must be signed in to change notification settings - Fork 209
Fixed IndexOutOfBoundsException for ClientPlayerDigging, ClientClientStatus, and ClientInteractEntity #1371
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
base: 2.0
Are you sure you want to change the base?
Conversation
|
|
||
| package com.github.retrooper.packetevents.protocol.player; | ||
|
|
||
| public enum InteractAction { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We now have the class 2 times, no?
https://github.com/retrooper/packetevents/pull/1371/files#diff-ea1bb08a8407de704db4ba3657b251d706d8cc19d1ad124504fd33e4fd6c5ef6R168
…layer/InteractAction.java Removed as it was useless
| import com.github.retrooper.packetevents.manager.server.ServerVersion; | ||
| import com.github.retrooper.packetevents.netty.buffer.ByteBufHelper; | ||
| import com.github.retrooper.packetevents.netty.buffer.ByteBufInputStream; | ||
| import com.github.retrooper.packetevents.netty.buffer.ByteBufOperator; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don’t get why these imports need to be in this class.
Why did you touch this class at all? Nothing’s really been added.
Also, your TODO comment should probably be an issue instead.
Removed TODO comment regarding byte buffer handling for malformed packets.
|
I'm not really a fan of adding yet more of these "UNKNOWN" enum states |
|
I actually like this approach. IMO it’s better to check if the enum is |
I wouldn't of made this poll request if I didn't think it would benefit everyone, if you continue to leave it as is, people can just bot a server with pe 2.0 and send invalid packet data spamming the console with errors. I also noticed that even legit players get kicked and console error for these. One of the major ones was the TODO that i could not fix but since removed. Many legits kept erroring packetevents for index out of bounds based on the face value pe would read. |
|
Thanks for the PR. |
retrooper
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Instead of adding 'UNKNOWN' fields to every enum, let's have the methods that get an enum from an ID return null if the ID is invalid. I think this is the best move here.
No description provided.