3
0
Mirror von https://github.com/PaperMC/Paper.git synchronisiert 2024-11-15 12:30:06 +01:00

Fix custom flying kick message

Dieser Commit ist enthalten in:
Shane Freeder 2018-10-02 06:54:45 +01:00
Ursprung f1a92f03db
Commit 3fc712a78f
Es konnte kein GPG-Schlüssel zu dieser Signatur gefunden werden
GPG-Schlüssel-ID: A3F61EA5A085289C
11 geänderte Dateien mit 37 neuen und 36 gelöschten Zeilen

Datei anzeigen

@ -1,4 +1,4 @@
From 9560a14dd040af52c535402e62eb8bfc19e83307 Mon Sep 17 00:00:00 2001 From 55ddd455018817f6aa1105cf06e3c7e2334718cc Mon Sep 17 00:00:00 2001
From: kashike <kashike@vq.lc> From: kashike <kashike@vq.lc>
Date: Tue, 20 Sep 2016 00:58:01 +0000 Date: Tue, 20 Sep 2016 00:58:01 +0000
Subject: [PATCH] Configurable flying kick messages Subject: [PATCH] Configurable flying kick messages
@ -21,18 +21,19 @@ index a702d1a286..4a91a9972d 100644
+ } + }
} }
diff --git a/src/main/java/net/minecraft/server/PlayerConnection.java b/src/main/java/net/minecraft/server/PlayerConnection.java diff --git a/src/main/java/net/minecraft/server/PlayerConnection.java b/src/main/java/net/minecraft/server/PlayerConnection.java
index 598b747ec0..a1c878fb4a 100644 index 598b747ec0..552f1355ce 100644
--- a/src/main/java/net/minecraft/server/PlayerConnection.java --- a/src/main/java/net/minecraft/server/PlayerConnection.java
+++ b/src/main/java/net/minecraft/server/PlayerConnection.java +++ b/src/main/java/net/minecraft/server/PlayerConnection.java
@@ -146,6 +146,7 @@ public class PlayerConnection implements PacketListenerPlayIn, ITickable { @@ -145,7 +145,7 @@ public class PlayerConnection implements PacketListenerPlayIn, ITickable {
if (this.B) {
if (++this.C > 80) { if (++this.C > 80) {
PlayerConnection.LOGGER.warn("{} was kicked for floating too long!", this.player.getDisplayName().getString()); PlayerConnection.LOGGER.warn("{} was kicked for floating too long!", this.player.getDisplayName().getString());
this.disconnect(new ChatMessage("multiplayer.disconnect.flying", new Object[0])); - this.disconnect(new ChatMessage("multiplayer.disconnect.flying", new Object[0]));
+ this.disconnect(com.destroystokyo.paper.PaperConfig.flyingKickPlayerMessage); // Paper - use configurable kick message + this.disconnect(com.destroystokyo.paper.PaperConfig.flyingKickPlayerMessage); // Paper - use configurable kick message
return; return;
} }
} else { } else {
@@ -164,7 +165,7 @@ public class PlayerConnection implements PacketListenerPlayIn, ITickable { @@ -164,7 +164,7 @@ public class PlayerConnection implements PacketListenerPlayIn, ITickable {
if (this.D && this.player.getRootVehicle().bO() == this.player) { if (this.D && this.player.getRootVehicle().bO() == this.player) {
if (++this.E > 80) { if (++this.E > 80) {
PlayerConnection.LOGGER.warn("{} was kicked for floating a vehicle too long!", this.player.getDisplayName().getString()); PlayerConnection.LOGGER.warn("{} was kicked for floating a vehicle too long!", this.player.getDisplayName().getString());

Datei anzeigen

@ -1,4 +1,4 @@
From e40358127de60bb2a07b37b2b24a3fcdc6a7badb Mon Sep 17 00:00:00 2001 From cd0d471d3222cdc103bedb9bd07621ec2f098cc1 Mon Sep 17 00:00:00 2001
From: Alfie Cleveland <alfeh@me.com> From: Alfie Cleveland <alfeh@me.com>
Date: Tue, 27 Dec 2016 01:57:57 +0000 Date: Tue, 27 Dec 2016 01:57:57 +0000
Subject: [PATCH] Properly fix item duplication bug Subject: [PATCH] Properly fix item duplication bug
@ -19,10 +19,10 @@ index e3ac9eb7d5..3644fde3bb 100644
@Override @Override
diff --git a/src/main/java/net/minecraft/server/PlayerConnection.java b/src/main/java/net/minecraft/server/PlayerConnection.java diff --git a/src/main/java/net/minecraft/server/PlayerConnection.java b/src/main/java/net/minecraft/server/PlayerConnection.java
index a1c878fb4a..3a91d91e8e 100644 index 552f1355ce..dc1f4f4e11 100644
--- a/src/main/java/net/minecraft/server/PlayerConnection.java --- a/src/main/java/net/minecraft/server/PlayerConnection.java
+++ b/src/main/java/net/minecraft/server/PlayerConnection.java +++ b/src/main/java/net/minecraft/server/PlayerConnection.java
@@ -2517,7 +2517,7 @@ public class PlayerConnection implements PacketListenerPlayIn, ITickable { @@ -2516,7 +2516,7 @@ public class PlayerConnection implements PacketListenerPlayIn, ITickable {
} }
public final boolean isDisconnected() { public final boolean isDisconnected() {

Datei anzeigen

@ -1,14 +1,14 @@
From 122218cc52a3284f0292c300c921f3c69d7f0b22 Mon Sep 17 00:00:00 2001 From 3c6260b482e950db8175272d423b2d301006dcb5 Mon Sep 17 00:00:00 2001
From: Michael Himing <mhiming@gmail.com> From: Michael Himing <mhiming@gmail.com>
Date: Sun, 8 Jan 2017 18:50:35 +1100 Date: Sun, 8 Jan 2017 18:50:35 +1100
Subject: [PATCH] Fix block break desync Subject: [PATCH] Fix block break desync
diff --git a/src/main/java/net/minecraft/server/PlayerConnection.java b/src/main/java/net/minecraft/server/PlayerConnection.java diff --git a/src/main/java/net/minecraft/server/PlayerConnection.java b/src/main/java/net/minecraft/server/PlayerConnection.java
index 3a91d91e8e..fb0f77f1b3 100644 index dc1f4f4e11..5f1d9cd40e 100644
--- a/src/main/java/net/minecraft/server/PlayerConnection.java --- a/src/main/java/net/minecraft/server/PlayerConnection.java
+++ b/src/main/java/net/minecraft/server/PlayerConnection.java +++ b/src/main/java/net/minecraft/server/PlayerConnection.java
@@ -1160,6 +1160,8 @@ public class PlayerConnection implements PacketListenerPlayIn, ITickable { @@ -1159,6 +1159,8 @@ public class PlayerConnection implements PacketListenerPlayIn, ITickable {
double d3 = d0 * d0 + d1 * d1 + d2 * d2; double d3 = d0 * d0 + d1 * d1 + d2 * d2;
if (d3 > 36.0D) { if (d3 > 36.0D) {

Datei anzeigen

@ -1,4 +1,4 @@
From cf0ef274d7d00e56af3759ab9f201b501f5c6f06 Mon Sep 17 00:00:00 2001 From 5ecdf5f97d28a70e5ec06d27e6b054bbcb6176d0 Mon Sep 17 00:00:00 2001
From: Zach Brown <zach.brown@destroystokyo.com> From: Zach Brown <zach.brown@destroystokyo.com>
Date: Tue, 16 May 2017 21:29:08 -0500 Date: Tue, 16 May 2017 21:29:08 -0500
Subject: [PATCH] Add option to make parrots stay on shoulders despite movement Subject: [PATCH] Add option to make parrots stay on shoulders despite movement
@ -39,10 +39,10 @@ index ad9e7f7b54..0f00eecead 100644
} }
diff --git a/src/main/java/net/minecraft/server/PlayerConnection.java b/src/main/java/net/minecraft/server/PlayerConnection.java diff --git a/src/main/java/net/minecraft/server/PlayerConnection.java b/src/main/java/net/minecraft/server/PlayerConnection.java
index fb0f77f1b3..450f045603 100644 index 5f1d9cd40e..f34613fb25 100644
--- a/src/main/java/net/minecraft/server/PlayerConnection.java --- a/src/main/java/net/minecraft/server/PlayerConnection.java
+++ b/src/main/java/net/minecraft/server/PlayerConnection.java +++ b/src/main/java/net/minecraft/server/PlayerConnection.java
@@ -1759,6 +1759,13 @@ public class PlayerConnection implements PacketListenerPlayIn, ITickable { @@ -1758,6 +1758,13 @@ public class PlayerConnection implements PacketListenerPlayIn, ITickable {
switch (packetplayinentityaction.c()) { switch (packetplayinentityaction.c()) {
case START_SNEAKING: case START_SNEAKING:
this.player.setSneaking(true); this.player.setSneaking(true);

Datei anzeigen

@ -1,4 +1,4 @@
From 82112a7b1082bc2b609c0271ad6d5c0247215721 Mon Sep 17 00:00:00 2001 From 02d094a81f938886ce698788fe4cbde37b25a640 Mon Sep 17 00:00:00 2001
From: Zach Brown <zach.brown@destroystokyo.com> From: Zach Brown <zach.brown@destroystokyo.com>
Date: Thu, 28 Sep 2017 17:21:44 -0400 Date: Thu, 28 Sep 2017 17:21:44 -0400
Subject: [PATCH] Add PlayerJumpEvent Subject: [PATCH] Add PlayerJumpEvent
@ -17,7 +17,7 @@ index 504c9ad473..4ac310bae1 100644
super.cH(); super.cH();
this.a(StatisticList.JUMP); this.a(StatisticList.JUMP);
diff --git a/src/main/java/net/minecraft/server/PlayerConnection.java b/src/main/java/net/minecraft/server/PlayerConnection.java diff --git a/src/main/java/net/minecraft/server/PlayerConnection.java b/src/main/java/net/minecraft/server/PlayerConnection.java
index 450f045603..3b02b6cb4d 100644 index f34613fb25..c12487b024 100644
--- a/src/main/java/net/minecraft/server/PlayerConnection.java --- a/src/main/java/net/minecraft/server/PlayerConnection.java
+++ b/src/main/java/net/minecraft/server/PlayerConnection.java +++ b/src/main/java/net/minecraft/server/PlayerConnection.java
@@ -59,6 +59,8 @@ import org.bukkit.inventory.CraftingInventory; @@ -59,6 +59,8 @@ import org.bukkit.inventory.CraftingInventory;
@ -29,7 +29,7 @@ index 450f045603..3b02b6cb4d 100644
import co.aikar.timings.MinecraftTimings; // Paper import co.aikar.timings.MinecraftTimings; // Paper
// CraftBukkit end // CraftBukkit end
@@ -876,7 +878,34 @@ public class PlayerConnection implements PacketListenerPlayIn, ITickable { @@ -875,7 +877,34 @@ public class PlayerConnection implements PacketListenerPlayIn, ITickable {
d8 = d5 - this.p; d8 = d5 - this.p;
d9 = d6 - this.q; d9 = d6 - this.q;
if (this.player.onGround && !packetplayinflying.b() && d8 > 0.0D) { if (this.player.onGround && !packetplayinflying.b() && d8 > 0.0D) {

Datei anzeigen

@ -1,4 +1,4 @@
From 6d225b736db48fea5844559db1fbfad28b97524a Mon Sep 17 00:00:00 2001 From 08e897f48e3d2cec25ab1a6bd56db1420eebe6be Mon Sep 17 00:00:00 2001
From: Shane Freeder <theboyetronic@gmail.com> From: Shane Freeder <theboyetronic@gmail.com>
Date: Thu, 5 Oct 2017 01:54:07 +0100 Date: Thu, 5 Oct 2017 01:54:07 +0100
Subject: [PATCH] handle PacketPlayInKeepAlive async Subject: [PATCH] handle PacketPlayInKeepAlive async
@ -15,10 +15,10 @@ also adding some additional logging in order to help work out what is causing
random disconnections for clients. random disconnections for clients.
diff --git a/src/main/java/net/minecraft/server/PlayerConnection.java b/src/main/java/net/minecraft/server/PlayerConnection.java diff --git a/src/main/java/net/minecraft/server/PlayerConnection.java b/src/main/java/net/minecraft/server/PlayerConnection.java
index 3b02b6cb4d..bf2656c74f 100644 index c12487b024..35a98bde1c 100644
--- a/src/main/java/net/minecraft/server/PlayerConnection.java --- a/src/main/java/net/minecraft/server/PlayerConnection.java
+++ b/src/main/java/net/minecraft/server/PlayerConnection.java +++ b/src/main/java/net/minecraft/server/PlayerConnection.java
@@ -2483,14 +2483,18 @@ public class PlayerConnection implements PacketListenerPlayIn, ITickable { @@ -2482,14 +2482,18 @@ public class PlayerConnection implements PacketListenerPlayIn, ITickable {
} }
public void a(PacketPlayInKeepAlive packetplayinkeepalive) { public void a(PacketPlayInKeepAlive packetplayinkeepalive) {

Datei anzeigen

@ -1,4 +1,4 @@
From d8b53e37b6aa868d28f229da08cca6ed6b00f34a Mon Sep 17 00:00:00 2001 From 0d734218b344ed4ab7c2ee8926a50b9b1dc3e2a3 Mon Sep 17 00:00:00 2001
From: Shane Freeder <theboyetronic@gmail.com> From: Shane Freeder <theboyetronic@gmail.com>
Date: Sun, 15 Oct 2017 00:29:07 +0100 Date: Sun, 15 Oct 2017 00:29:07 +0100
Subject: [PATCH] revert serverside behavior of keepalives Subject: [PATCH] revert serverside behavior of keepalives
@ -17,7 +17,7 @@ from networking or during connections flood of chunk packets on slower clients,
at the cost of dead connections being kept open for longer. at the cost of dead connections being kept open for longer.
diff --git a/src/main/java/net/minecraft/server/PlayerConnection.java b/src/main/java/net/minecraft/server/PlayerConnection.java diff --git a/src/main/java/net/minecraft/server/PlayerConnection.java b/src/main/java/net/minecraft/server/PlayerConnection.java
index bf2656c74f..7270638f4a 100644 index 35a98bde1c..62b7f24b5a 100644
--- a/src/main/java/net/minecraft/server/PlayerConnection.java --- a/src/main/java/net/minecraft/server/PlayerConnection.java
+++ b/src/main/java/net/minecraft/server/PlayerConnection.java +++ b/src/main/java/net/minecraft/server/PlayerConnection.java
@@ -71,7 +71,7 @@ public class PlayerConnection implements PacketListenerPlayIn, ITickable { @@ -71,7 +71,7 @@ public class PlayerConnection implements PacketListenerPlayIn, ITickable {
@ -37,7 +37,7 @@ index bf2656c74f..7270638f4a 100644
public PlayerConnection(MinecraftServer minecraftserver, NetworkManager networkmanager, EntityPlayer entityplayer) { public PlayerConnection(MinecraftServer minecraftserver, NetworkManager networkmanager, EntityPlayer entityplayer) {
this.minecraftServer = minecraftserver; this.minecraftServer = minecraftserver;
@@ -181,18 +182,26 @@ public class PlayerConnection implements PacketListenerPlayIn, ITickable { @@ -180,18 +181,26 @@ public class PlayerConnection implements PacketListenerPlayIn, ITickable {
} }
this.minecraftServer.methodProfiler.a("keepAlive"); this.minecraftServer.methodProfiler.a("keepAlive");

Datei anzeigen

@ -1,14 +1,14 @@
From 32ca5f96dc4dfba8b85020cd0157d086733cc5e6 Mon Sep 17 00:00:00 2001 From d83b434f71dac05dad84c2de38e1e185a7d41e77 Mon Sep 17 00:00:00 2001
From: 0x22 <0x22@futureclient.net> From: 0x22 <0x22@futureclient.net>
Date: Thu, 26 Apr 2018 04:41:11 -0400 Date: Thu, 26 Apr 2018 04:41:11 -0400
Subject: [PATCH] Fix exploit that allowed colored signs to be created Subject: [PATCH] Fix exploit that allowed colored signs to be created
diff --git a/src/main/java/net/minecraft/server/PlayerConnection.java b/src/main/java/net/minecraft/server/PlayerConnection.java diff --git a/src/main/java/net/minecraft/server/PlayerConnection.java b/src/main/java/net/minecraft/server/PlayerConnection.java
index 7861097f87..dfe7921a4a 100644 index d44ac990b4..da32ed7a01 100644
--- a/src/main/java/net/minecraft/server/PlayerConnection.java --- a/src/main/java/net/minecraft/server/PlayerConnection.java
+++ b/src/main/java/net/minecraft/server/PlayerConnection.java +++ b/src/main/java/net/minecraft/server/PlayerConnection.java
@@ -2493,7 +2493,7 @@ public class PlayerConnection implements PacketListenerPlayIn, ITickable { @@ -2495,7 +2495,7 @@ public class PlayerConnection implements PacketListenerPlayIn, ITickable {
String[] lines = new String[4]; String[] lines = new String[4];
for (int i = 0; i < astring.length; ++i) { for (int i = 0; i < astring.length; ++i) {

Datei anzeigen

@ -1,4 +1,4 @@
From ac07641c46fb82792fac6733c44147ef00f4e88d Mon Sep 17 00:00:00 2001 From fffc012afaa17f04b29429309aa29e414622dfd8 Mon Sep 17 00:00:00 2001
From: Aikar <aikar@aikar.co> From: Aikar <aikar@aikar.co>
Date: Tue, 3 Jul 2018 21:56:23 -0400 Date: Tue, 3 Jul 2018 21:56:23 -0400
Subject: [PATCH] InventoryCloseEvent Reason API Subject: [PATCH] InventoryCloseEvent Reason API
@ -110,10 +110,10 @@ index 3644fde3bb..68f5842cfe 100644
this.m(); this.m();
} }
diff --git a/src/main/java/net/minecraft/server/PlayerConnection.java b/src/main/java/net/minecraft/server/PlayerConnection.java diff --git a/src/main/java/net/minecraft/server/PlayerConnection.java b/src/main/java/net/minecraft/server/PlayerConnection.java
index dfe7921a4a..fe967bac5b 100644 index da32ed7a01..9819bc0576 100644
--- a/src/main/java/net/minecraft/server/PlayerConnection.java --- a/src/main/java/net/minecraft/server/PlayerConnection.java
+++ b/src/main/java/net/minecraft/server/PlayerConnection.java +++ b/src/main/java/net/minecraft/server/PlayerConnection.java
@@ -2029,7 +2029,7 @@ public class PlayerConnection implements PacketListenerPlayIn, ITickable { @@ -2031,7 +2031,7 @@ public class PlayerConnection implements PacketListenerPlayIn, ITickable {
PlayerConnectionUtils.ensureMainThread(packetplayinclosewindow, this, this.player.getWorldServer()); PlayerConnectionUtils.ensureMainThread(packetplayinclosewindow, this, this.player.getWorldServer());
if (this.player.isFrozen()) return; // CraftBukkit if (this.player.isFrozen()) return; // CraftBukkit

Datei anzeigen

@ -1,4 +1,4 @@
From 53226e517933eddd9d6db482e86d5ca33a604832 Mon Sep 17 00:00:00 2001 From 7e83534fa07819817ce6033a0c4ec18cc1702f02 Mon Sep 17 00:00:00 2001
From: Minecrell <minecrell@minecrell.net> From: Minecrell <minecrell@minecrell.net>
Date: Fri, 13 Jul 2018 14:54:43 +0200 Date: Fri, 13 Jul 2018 14:54:43 +0200
Subject: [PATCH] Refresh player inventory when cancelling Subject: [PATCH] Refresh player inventory when cancelling
@ -16,10 +16,10 @@ Refresh the player inventory when PlayerInteractEntityEvent is
cancelled to avoid this problem. cancelled to avoid this problem.
diff --git a/src/main/java/net/minecraft/server/PlayerConnection.java b/src/main/java/net/minecraft/server/PlayerConnection.java diff --git a/src/main/java/net/minecraft/server/PlayerConnection.java b/src/main/java/net/minecraft/server/PlayerConnection.java
index fe967bac5b..5781f4d2ce 100644 index 9819bc0576..05b5e23bf3 100644
--- a/src/main/java/net/minecraft/server/PlayerConnection.java --- a/src/main/java/net/minecraft/server/PlayerConnection.java
+++ b/src/main/java/net/minecraft/server/PlayerConnection.java +++ b/src/main/java/net/minecraft/server/PlayerConnection.java
@@ -1943,6 +1943,7 @@ public class PlayerConnection implements PacketListenerPlayIn, ITickable { @@ -1945,6 +1945,7 @@ public class PlayerConnection implements PacketListenerPlayIn, ITickable {
} }
if (event.isCancelled()) { if (event.isCancelled()) {

Datei anzeigen

@ -1,4 +1,4 @@
From 562e223df4bdb81d7e94dcaf9953da1c81dc61e3 Mon Sep 17 00:00:00 2001 From 31935e155c4aeb345d2a16f88ad1b1e0c5b3123e Mon Sep 17 00:00:00 2001
From: Shane Freeder <theboyetronic@gmail.com> From: Shane Freeder <theboyetronic@gmail.com>
Date: Sun, 29 Jul 2018 05:02:15 +0100 Date: Sun, 29 Jul 2018 05:02:15 +0100
Subject: [PATCH] Break up and make tab spam limits configurable Subject: [PATCH] Break up and make tab spam limits configurable
@ -45,7 +45,7 @@ index b32e75ae9a..3419847e34 100644
+ } + }
} }
diff --git a/src/main/java/net/minecraft/server/PlayerConnection.java b/src/main/java/net/minecraft/server/PlayerConnection.java diff --git a/src/main/java/net/minecraft/server/PlayerConnection.java b/src/main/java/net/minecraft/server/PlayerConnection.java
index 5781f4d2ce..d1ad7728e3 100644 index 05b5e23bf3..1e5ac7185e 100644
--- a/src/main/java/net/minecraft/server/PlayerConnection.java --- a/src/main/java/net/minecraft/server/PlayerConnection.java
+++ b/src/main/java/net/minecraft/server/PlayerConnection.java +++ b/src/main/java/net/minecraft/server/PlayerConnection.java
@@ -77,6 +77,7 @@ public class PlayerConnection implements PacketListenerPlayIn, ITickable { @@ -77,6 +77,7 @@ public class PlayerConnection implements PacketListenerPlayIn, ITickable {
@ -56,7 +56,7 @@ index 5781f4d2ce..d1ad7728e3 100644
// CraftBukkit end // CraftBukkit end
private int j; private int j;
private final IntHashMap<Short> k = new IntHashMap(); private final IntHashMap<Short> k = new IntHashMap();
@@ -206,6 +207,7 @@ public class PlayerConnection implements PacketListenerPlayIn, ITickable { @@ -205,6 +206,7 @@ public class PlayerConnection implements PacketListenerPlayIn, ITickable {
this.minecraftServer.methodProfiler.e(); this.minecraftServer.methodProfiler.e();
// CraftBukkit start // CraftBukkit start
for (int spam; (spam = this.chatThrottle) > 0 && !chatSpamField.compareAndSet(this, spam, spam - 1); ) ; for (int spam; (spam = this.chatThrottle) > 0 && !chatSpamField.compareAndSet(this, spam, spam - 1); ) ;
@ -64,7 +64,7 @@ index 5781f4d2ce..d1ad7728e3 100644
/* Use thread-safe field access instead /* Use thread-safe field access instead
if (this.chatThrottle > 0) { if (this.chatThrottle > 0) {
--this.chatThrottle; --this.chatThrottle;
@@ -511,7 +513,7 @@ public class PlayerConnection implements PacketListenerPlayIn, ITickable { @@ -510,7 +512,7 @@ public class PlayerConnection implements PacketListenerPlayIn, ITickable {
public void a(PacketPlayInTabComplete packetplayintabcomplete) { public void a(PacketPlayInTabComplete packetplayintabcomplete) {
// PlayerConnectionUtils.ensureMainThread(packetplayintabcomplete, this, this.player.getWorldServer()); // Paper - run this async // PlayerConnectionUtils.ensureMainThread(packetplayintabcomplete, this, this.player.getWorldServer()); // Paper - run this async
// CraftBukkit start // CraftBukkit start