mirror of
https://github.com/Minestom/Minestom.git
synced 2025-01-02 14:38:26 +01:00
Prevent the client from breaking due to weird command syntaxes
This commit is contained in:
parent
9afb86a511
commit
460585ae9b
@ -52,6 +52,9 @@ public class DeclareCommandsPacket implements ServerPacket {
|
||||
public void write(@NotNull BinaryWriter writer) {
|
||||
writer.writeByte(flags);
|
||||
|
||||
if (children != null && children.length > 262114) {
|
||||
throw new RuntimeException("Children length " + children.length + " is bigger than the maximum allowed " + 262114);
|
||||
}
|
||||
writer.writeVarIntArray(children);
|
||||
|
||||
if ((flags & 0x08) != 0) {
|
||||
|
Loading…
Reference in New Issue
Block a user