aboutsummaryrefslogtreecommitdiffhomepage
path: root/patches/server/0546-Add-PlayerKickEvent-causes.patch
diff options
context:
space:
mode:
Diffstat (limited to 'patches/server/0546-Add-PlayerKickEvent-causes.patch')
-rw-r--r--patches/server/0546-Add-PlayerKickEvent-causes.patch30
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 0aaf3a8854..8827547149 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 b908e292d7b2fbff6cc5058ea32648dbde52fa19..c07d6a05737da570e7dc52e73b45e7550dcc61d0 100644
+index fcbdf2c6efe8229a0f82ae4a730f2217aa6a76f6..703543684461acb38f99bf0f2b100ffc61ece2a4 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 b908e292d7b2fbff6cc5058ea32648dbde52fa19..c07d6a05737da570e7dc52e73b45e755
return;
}
this.player.getInventory().pickSlot(packet.getSlot()); // Paper - Diff above if changed
-@@ -1106,14 +1106,14 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
+@@ -1109,14 +1109,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 b908e292d7b2fbff6cc5058ea32648dbde52fa19..c07d6a05737da570e7dc52e73b45e755
return;
}
this.lastBookTick = MinecraftServer.currentTick;
-@@ -1225,7 +1225,7 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
+@@ -1228,7 +1228,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 b908e292d7b2fbff6cc5058ea32648dbde52fa19..c07d6a05737da570e7dc52e73b45e755
} else {
ServerLevel worldserver = this.player.serverLevel();
-@@ -1663,7 +1663,7 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
+@@ -1666,7 +1666,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 b908e292d7b2fbff6cc5058ea32648dbde52fa19..c07d6a05737da570e7dc52e73b45e755
return;
}
}
-@@ -1951,7 +1951,7 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
+@@ -1954,7 +1954,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 b908e292d7b2fbff6cc5058ea32648dbde52fa19..c07d6a05737da570e7dc52e73b45e755
}
}
-@@ -2149,7 +2149,7 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
+@@ -2152,7 +2152,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 b908e292d7b2fbff6cc5058ea32648dbde52fa19..c07d6a05737da570e7dc52e73b45e755
} 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 {
-@@ -2172,7 +2172,7 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
+@@ -2175,7 +2175,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 b908e292d7b2fbff6cc5058ea32648dbde52fa19..c07d6a05737da570e7dc52e73b45e755
}
return optional;
-@@ -2358,7 +2358,7 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
+@@ -2361,7 +2361,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 b908e292d7b2fbff6cc5058ea32648dbde52fa19..c07d6a05737da570e7dc52e73b45e755
}
}
-@@ -2370,7 +2370,7 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
+@@ -2373,7 +2373,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 b908e292d7b2fbff6cc5058ea32648dbde52fa19..c07d6a05737da570e7dc52e73b45e755
}
}
-@@ -2518,7 +2518,7 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
+@@ -2521,7 +2521,7 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
}
if (i > 4096) {
@@ -373,7 +373,7 @@ index b908e292d7b2fbff6cc5058ea32648dbde52fa19..c07d6a05737da570e7dc52e73b45e755
}
}
-@@ -2576,7 +2576,7 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
+@@ -2579,7 +2579,7 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
// Spigot Start
if ( entity == this.player && !this.player.isSpectator() )
{
@@ -382,7 +382,7 @@ index b908e292d7b2fbff6cc5058ea32648dbde52fa19..c07d6a05737da570e7dc52e73b45e755
return;
}
// Spigot End
-@@ -2690,7 +2690,7 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
+@@ -2693,7 +2693,7 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
}
}
@@ -391,7 +391,7 @@ index b908e292d7b2fbff6cc5058ea32648dbde52fa19..c07d6a05737da570e7dc52e73b45e755
ServerGamePacketListenerImpl.LOGGER.warn("Player {} tried to attack an invalid entity", ServerGamePacketListenerImpl.this.player.getName().getString());
}
});
-@@ -3087,7 +3087,7 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
+@@ -3090,7 +3090,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 b908e292d7b2fbff6cc5058ea32648dbde52fa19..c07d6a05737da570e7dc52e73b45e755
return;
}
}
-@@ -3329,7 +3329,7 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
+@@ -3332,7 +3332,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 b908e292d7b2fbff6cc5058ea32648dbde52fa19..c07d6a05737da570e7dc52e73b45e755
} else {
try {
SignatureValidator signaturevalidator = this.server.getProfileKeySignatureValidator();
-@@ -3342,7 +3342,7 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
+@@ -3345,7 +3345,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());