Mirror von
https://github.com/PaperMC/Paper.git
synchronisiert 2024-12-15 19:10:09 +01:00
29 Zeilen
2.2 KiB
Diff
29 Zeilen
2.2 KiB
Diff
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
|
|
index 9646788fc1313467e5a93f923109d412d6c44a77..9289df9663a2dfbc28c2c6dd8c31bf516a6229ae 100644
|
|
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
|
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
|
@@ -353,7 +353,7 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
|
|
if (this.clientIsFloating && !this.player.isSleeping() && !this.player.isPassenger() && !this.player.isDeadOrDying()) {
|
|
if (++this.aboveGroundTickCount > this.getMaximumFlyingTicks(this.player)) {
|
|
ServerGamePacketListenerImpl.LOGGER.warn("{} was kicked for floating too long!", this.player.getName().getString());
|
|
- this.disconnect((Component) Component.translatable("multiplayer.disconnect.flying"));
|
|
+ this.disconnect(io.papermc.paper.configuration.GlobalConfiguration.get().messages.kick.flyingPlayer); // Paper - use configurable kick message
|
|
return;
|
|
}
|
|
} else {
|
|
@@ -372,7 +372,7 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
|
|
if (this.clientVehicleIsFloating && this.lastVehicle.getControllingPassenger() == this.player) {
|
|
if (++this.aboveGroundVehicleTickCount > this.getMaximumFlyingTicks(this.lastVehicle)) {
|
|
ServerGamePacketListenerImpl.LOGGER.warn("{} was kicked for floating a vehicle too long!", this.player.getName().getString());
|
|
- this.disconnect((Component) Component.translatable("multiplayer.disconnect.flying"));
|
|
+ this.disconnect(io.papermc.paper.configuration.GlobalConfiguration.get().messages.kick.flyingVehicle); // Paper - use configurable kick message
|
|
return;
|
|
}
|
|
} else {
|