diff options
Diffstat (limited to 'patches/server/0546-Add-PlayerKickEvent-causes.patch')
-rw-r--r-- | patches/server/0546-Add-PlayerKickEvent-causes.patch | 30 |
1 files changed, 15 insertions, 15 deletions
diff --git a/patches/server/0546-Add-PlayerKickEvent-causes.patch b/patches/server/0546-Add-PlayerKickEvent-causes.patch index 8827547149..94d1dc687c 100644 --- a/patches/server/0546-Add-PlayerKickEvent-causes.patch +++ b/patches/server/0546-Add-PlayerKickEvent-causes.patch @@ -218,7 +218,7 @@ index 24bf661e76fb421a8be565d9ea68edf7205254d2..feb529adf2168025c785ab92d95a3246 if (this.cserver.getServer().isRunning()) { this.cserver.getPluginManager().callEvent(event); diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java -index fcbdf2c6efe8229a0f82ae4a730f2217aa6a76f6..703543684461acb38f99bf0f2b100ffc61ece2a4 100644 +index 757f0aa42ee945fda11d05864405f9ecb5208226..f098997bab367e50781e3062fd2de73454a711a3 100644 --- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java +++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java @@ -349,7 +349,7 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl @@ -284,7 +284,7 @@ index fcbdf2c6efe8229a0f82ae4a730f2217aa6a76f6..703543684461acb38f99bf0f2b100ffc return; } this.player.getInventory().pickSlot(packet.getSlot()); // Paper - Diff above if changed -@@ -1109,14 +1109,14 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl +@@ -1110,14 +1110,14 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl if (byteTotal > byteAllowed) { ServerGamePacketListenerImpl.LOGGER.warn("{} tried to send a book too large. Book size: {} - Allowed: {} - Pages: {}", this.player.getScoreboardName(), byteTotal, byteAllowed, pageList.size()); @@ -301,7 +301,7 @@ index fcbdf2c6efe8229a0f82ae4a730f2217aa6a76f6..703543684461acb38f99bf0f2b100ffc return; } this.lastBookTick = MinecraftServer.currentTick; -@@ -1228,7 +1228,7 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl +@@ -1229,7 +1229,7 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl public void handleMovePlayer(ServerboundMovePlayerPacket packet) { PacketUtils.ensureRunningOnSameThread(packet, this, this.player.serverLevel()); if (ServerGamePacketListenerImpl.containsInvalidValues(packet.getX(0.0D), packet.getY(0.0D), packet.getZ(0.0D), packet.getYRot(0.0F), packet.getXRot(0.0F))) { @@ -310,7 +310,7 @@ index fcbdf2c6efe8229a0f82ae4a730f2217aa6a76f6..703543684461acb38f99bf0f2b100ffc } else { ServerLevel worldserver = this.player.serverLevel(); -@@ -1666,7 +1666,7 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl +@@ -1667,7 +1667,7 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl this.dropCount++; if (this.dropCount >= 20) { ServerGamePacketListenerImpl.LOGGER.warn(this.player.getScoreboardName() + " dropped their items too quickly!"); @@ -319,7 +319,7 @@ index fcbdf2c6efe8229a0f82ae4a730f2217aa6a76f6..703543684461acb38f99bf0f2b100ffc return; } } -@@ -1954,7 +1954,7 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl +@@ -1955,7 +1955,7 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl this.player.resetLastActionTime(); } else { ServerGamePacketListenerImpl.LOGGER.warn("{} tried to set an invalid carried item", this.player.getName().getString()); @@ -328,7 +328,7 @@ index fcbdf2c6efe8229a0f82ae4a730f2217aa6a76f6..703543684461acb38f99bf0f2b100ffc } } -@@ -2152,7 +2152,7 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl +@@ -2153,7 +2153,7 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl private void tryHandleChat(String s, Runnable runnable, boolean sync) { // CraftBukkit if (ServerGamePacketListenerImpl.isChatMessageIllegal(s)) { @@ -337,7 +337,7 @@ index fcbdf2c6efe8229a0f82ae4a730f2217aa6a76f6..703543684461acb38f99bf0f2b100ffc } else if (this.player.isRemoved() || this.player.getChatVisibility() == ChatVisiblity.HIDDEN) { // CraftBukkit - dead men tell no tales this.send(new ClientboundSystemChatPacket(Component.translatable("chat.disabled.options").withStyle(ChatFormatting.RED), false)); } else { -@@ -2175,7 +2175,7 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl +@@ -2176,7 +2176,7 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl if (optional.isEmpty()) { ServerGamePacketListenerImpl.LOGGER.warn("Failed to validate message acknowledgements from {}", this.player.getName().getString()); @@ -346,7 +346,7 @@ index fcbdf2c6efe8229a0f82ae4a730f2217aa6a76f6..703543684461acb38f99bf0f2b100ffc } return optional; -@@ -2361,7 +2361,7 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl +@@ -2362,7 +2362,7 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl // this.chatSpamTickCount += 20; if (this.chatSpamTickCount.addAndGet(20) > 200 && !this.server.getPlayerList().isOp(this.player.getGameProfile()) && !this.server.isSingleplayerOwner(this.player.getGameProfile())) { // CraftBukkit end @@ -355,7 +355,7 @@ index fcbdf2c6efe8229a0f82ae4a730f2217aa6a76f6..703543684461acb38f99bf0f2b100ffc } } -@@ -2373,7 +2373,7 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl +@@ -2374,7 +2374,7 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl synchronized (this.lastSeenMessages) { if (!this.lastSeenMessages.applyOffset(packet.offset())) { ServerGamePacketListenerImpl.LOGGER.warn("Failed to validate message acknowledgements from {}", this.player.getName().getString()); @@ -364,7 +364,7 @@ index fcbdf2c6efe8229a0f82ae4a730f2217aa6a76f6..703543684461acb38f99bf0f2b100ffc } } -@@ -2521,7 +2521,7 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl +@@ -2522,7 +2522,7 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl } if (i > 4096) { @@ -373,7 +373,7 @@ index fcbdf2c6efe8229a0f82ae4a730f2217aa6a76f6..703543684461acb38f99bf0f2b100ffc } } -@@ -2579,7 +2579,7 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl +@@ -2580,7 +2580,7 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl // Spigot Start if ( entity == this.player && !this.player.isSpectator() ) { @@ -382,7 +382,7 @@ index fcbdf2c6efe8229a0f82ae4a730f2217aa6a76f6..703543684461acb38f99bf0f2b100ffc return; } // Spigot End -@@ -2693,7 +2693,7 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl +@@ -2694,7 +2694,7 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl } } @@ -391,7 +391,7 @@ index fcbdf2c6efe8229a0f82ae4a730f2217aa6a76f6..703543684461acb38f99bf0f2b100ffc ServerGamePacketListenerImpl.LOGGER.warn("Player {} tried to attack an invalid entity", ServerGamePacketListenerImpl.this.player.getName().getString()); } }); -@@ -3090,7 +3090,7 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl +@@ -3091,7 +3091,7 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl // Paper start - auto recipe limit if (!org.bukkit.Bukkit.isPrimaryThread()) { if (this.recipeSpamPackets.addAndGet(io.papermc.paper.configuration.GlobalConfiguration.get().spamLimiter.recipeSpamIncrement) > io.papermc.paper.configuration.GlobalConfiguration.get().spamLimiter.recipeSpamLimit) { @@ -400,7 +400,7 @@ index fcbdf2c6efe8229a0f82ae4a730f2217aa6a76f6..703543684461acb38f99bf0f2b100ffc return; } } -@@ -3332,7 +3332,7 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl +@@ -3333,7 +3333,7 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl if (!Objects.equals(profilepublickey_a, profilepublickey_a1)) { if (profilepublickey_a != null && profilepublickey_a1.expiresAt().isBefore(profilepublickey_a.expiresAt())) { @@ -409,7 +409,7 @@ index fcbdf2c6efe8229a0f82ae4a730f2217aa6a76f6..703543684461acb38f99bf0f2b100ffc } else { try { SignatureValidator signaturevalidator = this.server.getProfileKeySignatureValidator(); -@@ -3345,7 +3345,7 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl +@@ -3346,7 +3346,7 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl this.resetPlayerChatState(remotechatsession_a.validate(this.player.getGameProfile(), signaturevalidator)); } catch (ProfilePublicKey.ValidationException profilepublickey_b) { ServerGamePacketListenerImpl.LOGGER.error("Failed to validate profile key: {}", profilepublickey_b.getMessage()); |