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
|
2023-02-13 18:52:27 +01:00
|
|
|
index 481ddcf40d1e96d162b0e28737a71fb390e8715d..f1e91f245a291d403f7668470dbda015b9a731cd 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
|
2022-12-07 19:52:24 +01:00
|
|
|
@@ -351,7 +351,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
|
2022-03-01 06:43:03 +01:00
|
|
|
if (this.clientIsFloating && !this.player.isSleeping() && !this.player.isPassenger()) {
|
2021-06-11 14:02:28 +02:00
|
|
|
if (++this.aboveGroundTickCount > 80) {
|
|
|
|
ServerGamePacketListenerImpl.LOGGER.warn("{} was kicked for floating too long!", this.player.getName().getString());
|
2022-06-07 21:55:39 +02:00
|
|
|
- this.disconnect(Component.translatable("multiplayer.disconnect.flying"));
|
2022-06-09 10:51:45 +02:00
|
|
|
+ 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 {
|
2022-12-07 19:52:24 +01:00
|
|
|
@@ -370,7 +370,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
|
2021-06-11 14:02:28 +02: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 21:55:39 +02:00
|
|
|
- this.disconnect(Component.translatable("multiplayer.disconnect.flying"));
|
2022-06-09 10:51:45 +02:00
|
|
|
+ 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 {
|