more work and compile fixes

This commit is contained in:
Jake Potrebic
2023-06-07 15:12:41 -07:00
parent eb4be91142
commit 074728fe8c
31 changed files with 50 additions and 43 deletions

View File

@@ -117,7 +117,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
- this.getHandle().connection.chat(msg, PlayerChatMessage.system(msg), false);
+ // Paper start - improve chat handling
+ if (ServerGamePacketListenerImpl.isChatMessageIllegal(msg)) {
+ this.getHandle().connection.disconnect(Component.translatable("multiplayer.disconnect.illegal_characters"), org.bukkit.event.player.PlayerKickEvent.Cause.ILLEGAL_CHARACTERS);
+ this.getHandle().connection.disconnect(Component.translatable("multiplayer.disconnect.illegal_characters"));
+ } else {
+ if (msg.startsWith("/")) {
+ this.getHandle().connection.handleCommand(msg);