PaperMC/patches/server/0106-Configurable-flying-kick-messages.patch

29 lines
2.2 KiB
Diff
Raw Permalink Normal View History

2021-06-11 14:02:28 +02:00
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: kashike <kashike@vq.lc>
Date: Tue, 20 Sep 2016 00:58:01 +0000
Subject: [PATCH] Configurable flying kick messages
diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
2024-12-03 19:05:31 +01:00
index bffff41f73b91c83fa35ebf34314cb6fdbfcb643..8a8f073a29daf7cb36e5fd0e4d4e5932636bb04f 100644
2021-06-11 14:02:28 +02:00
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
2024-12-03 19:05:31 +01:00
@@ -357,7 +357,7 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
2023-03-14 19:36:39 +01:00
if (this.clientIsFloating && !this.player.isSleeping() && !this.player.isPassenger() && !this.player.isDeadOrDying()) {
2024-04-24 03:25:14 +02:00
if (++this.aboveGroundTickCount > this.getMaximumFlyingTicks(this.player)) {
2021-06-11 14:02:28 +02:00
ServerGamePacketListenerImpl.LOGGER.warn("{} was kicked for floating too long!", this.player.getName().getString());
2024-06-13 19:30:39 +02:00
- this.disconnect((Component) Component.translatable("multiplayer.disconnect.flying"));
+ this.disconnect(io.papermc.paper.configuration.GlobalConfiguration.get().messages.kick.flyingPlayer); // Paper - use configurable kick message
2021-06-11 14:02:28 +02:00
return;
}
} else {
2024-12-03 19:05:31 +01:00
@@ -376,7 +376,7 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
2024-04-24 03:25:14 +02:00
if (this.clientVehicleIsFloating && this.lastVehicle.getControllingPassenger() == this.player) {
if (++this.aboveGroundVehicleTickCount > this.getMaximumFlyingTicks(this.lastVehicle)) {
2021-06-11 14:02:28 +02:00
ServerGamePacketListenerImpl.LOGGER.warn("{} was kicked for floating a vehicle too long!", this.player.getName().getString());
2024-06-13 19:30:39 +02:00
- this.disconnect((Component) Component.translatable("multiplayer.disconnect.flying"));
+ this.disconnect(io.papermc.paper.configuration.GlobalConfiguration.get().messages.kick.flyingVehicle); // Paper - use configurable kick message
2021-06-11 14:02:28 +02:00
return;
}
} else {