2021-06-11 12:02:28 +00: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
|
2023-06-21 13:36:14 +00:00
|
|
|
index 3ac549815895e6cbb43cbfc04377337f8b7ebd43..c33b94701a8c4f3198671405d32467d9645bf87f 100644
|
2021-06-11 12:02:28 +00:00
|
|
|
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
|
|
|
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
2023-05-12 11:10:08 +00:00
|
|
|
@@ -355,7 +355,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
|
2023-03-14 18:36:39 +00:00
|
|
|
if (this.clientIsFloating && !this.player.isSleeping() && !this.player.isPassenger() && !this.player.isDeadOrDying()) {
|
2021-06-11 12:02:28 +00:00
|
|
|
if (++this.aboveGroundTickCount > 80) {
|
|
|
|
ServerGamePacketListenerImpl.LOGGER.warn("{} was kicked for floating too long!", this.player.getName().getString());
|
2022-06-07 19:55:39 +00:00
|
|
|
- this.disconnect(Component.translatable("multiplayer.disconnect.flying"));
|
2022-06-09 08:51:45 +00:00
|
|
|
+ this.disconnect(io.papermc.paper.configuration.GlobalConfiguration.get().messages.kick.flyingPlayer); // Paper - use configurable kick message
|
2021-06-11 12:02:28 +00:00
|
|
|
return;
|
|
|
|
}
|
|
|
|
} else {
|
2023-05-12 11:10:08 +00:00
|
|
|
@@ -374,7 +374,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
|
2021-06-11 12:02:28 +00:00
|
|
|
if (this.clientVehicleIsFloating && this.player.getRootVehicle().getControllingPassenger() == this.player) {
|
|
|
|
if (++this.aboveGroundVehicleTickCount > 80) {
|
|
|
|
ServerGamePacketListenerImpl.LOGGER.warn("{} was kicked for floating a vehicle too long!", this.player.getName().getString());
|
2022-06-07 19:55:39 +00:00
|
|
|
- this.disconnect(Component.translatable("multiplayer.disconnect.flying"));
|
2022-06-09 08:51:45 +00:00
|
|
|
+ this.disconnect(io.papermc.paper.configuration.GlobalConfiguration.get().messages.kick.flyingVehicle); // Paper - use configurable kick message
|
2021-06-11 12:02:28 +00:00
|
|
|
return;
|
|
|
|
}
|
|
|
|
} else {
|