mirror of
https://github.com/PurpurMC/Purpur.git
synced 2026-02-18 00:47:42 +01:00
Updated Upstream (Paper & Tuinity)
Upstream has released updates that appear to apply and compile correctly Paper Changes: 0ea308381 Updated Upstream (Bukkit/CraftBukkit) Tuinity Changes: 502d57ba Updated Upstream (Paper) 4415b59b Improve behavior for hard colliding entities e5f54a3f Fix chunks refusing to unload at low TPS 2dfd22e4 Fix incorrect isRealPlayer init
This commit is contained in:
@@ -5,10 +5,10 @@ Subject: [PATCH] PlayerBookTooLargeEvent
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/PlayerConnection.java b/src/main/java/net/minecraft/server/PlayerConnection.java
|
||||
index e9485684b7d5ddde72fc388d51cfef679178bad3..75d955948a407d94e6f3a88f86afa8b1d6ba33cb 100644
|
||||
index ef222cdfdfb49dcdcb0e3bf6f6cabc765be003cc..95c1ba7241069ad291c2acef6972937ac7c4c7c7 100644
|
||||
--- a/src/main/java/net/minecraft/server/PlayerConnection.java
|
||||
+++ b/src/main/java/net/minecraft/server/PlayerConnection.java
|
||||
@@ -941,6 +941,7 @@ public class PlayerConnection implements PacketListenerPlayIn {
|
||||
@@ -966,6 +966,7 @@ public class PlayerConnection implements PacketListenerPlayIn {
|
||||
NBTTagList pageList = testStack.getTag().getList("pages", 8);
|
||||
if (pageList.size() > 100) {
|
||||
PlayerConnection.LOGGER.warn(this.player.getName() + " tried to send a book with too many pages");
|
||||
@@ -16,7 +16,7 @@ index e9485684b7d5ddde72fc388d51cfef679178bad3..75d955948a407d94e6f3a88f86afa8b1
|
||||
minecraftServer.scheduleOnMain(() -> this.disconnect("Book too large!"));
|
||||
return;
|
||||
}
|
||||
@@ -953,6 +954,7 @@ public class PlayerConnection implements PacketListenerPlayIn {
|
||||
@@ -978,6 +979,7 @@ public class PlayerConnection implements PacketListenerPlayIn {
|
||||
int byteLength = testString.getBytes(java.nio.charset.StandardCharsets.UTF_8).length;
|
||||
if (byteLength > 256 * 4) {
|
||||
PlayerConnection.LOGGER.warn(this.player.getName() + " tried to send a book with with a page too large!");
|
||||
@@ -24,7 +24,7 @@ index e9485684b7d5ddde72fc388d51cfef679178bad3..75d955948a407d94e6f3a88f86afa8b1
|
||||
minecraftServer.scheduleOnMain(() -> this.disconnect("Book too large!"));
|
||||
return;
|
||||
}
|
||||
@@ -976,6 +978,7 @@ public class PlayerConnection implements PacketListenerPlayIn {
|
||||
@@ -1001,6 +1003,7 @@ public class PlayerConnection implements PacketListenerPlayIn {
|
||||
|
||||
if (byteTotal > byteAllowed) {
|
||||
PlayerConnection.LOGGER.warn(this.player.getName() + " tried to send too large of a book. Book Size: " + byteTotal + " - Allowed: "+ byteAllowed + " - Pages: " + pageList.size());
|
||||
|
||||
Reference in New Issue
Block a user