mirror of
https://github.com/PurpurMC/Purpur.git
synced 2026-02-19 01:17:42 +01:00
Updated Upstream (Paper, Tuinity, & Airplane)
Upstream has released updates that appear to apply and compile correctly Paper Changes: 8ed45920c Don't annotate type parameters using JetBrains annotations (#5600) d7625d926 Add new methods from PlayerMoveEvent to EntityMoveEvent (#5591) 29785297b Allow for Component suggestion tooltips in AsyncTabCompleteEvent (#5504) 0aea6c2ff Use JsonSerializationContext#serialize instead of recursion for AdventureComponents - fixes #5580 and #5371 Tuinity Changes: 3350246ce Updated Upstream (Paper) f773caf21 Fix rare ticket level recursion crash 0fa8a0e92 Starlight Handle concurrent chunk generation and lighting better Airplane Changes: fad74c215 Fix JB annotations for gradle (credit jpenilla) d02f034e6 Updated Upstream (Tuinity)
This commit is contained in:
@@ -5,10 +5,10 @@ Subject: [PATCH] PlayerBookTooLargeEvent
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/network/PlayerConnection.java b/src/main/java/net/minecraft/server/network/PlayerConnection.java
|
||||
index 59eedbe9d249fd09673393651a8be76232ab16e9..f55485094a5b676d8051d1f8d3151340bf176b33 100644
|
||||
index bf6c040cfe68f96fa25511967091677abdaf4f0e..fbfb3eba79ded3720edf93b3d1c18cbc02c086dd 100644
|
||||
--- a/src/main/java/net/minecraft/server/network/PlayerConnection.java
|
||||
+++ b/src/main/java/net/minecraft/server/network/PlayerConnection.java
|
||||
@@ -1123,6 +1123,7 @@ public class PlayerConnection implements PacketListenerPlayIn {
|
||||
@@ -1128,6 +1128,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 59eedbe9d249fd09673393651a8be76232ab16e9..f55485094a5b676d8051d1f8d3151340
|
||||
minecraftServer.scheduleOnMain(() -> this.disconnect("Book too large!"));
|
||||
return;
|
||||
}
|
||||
@@ -1135,6 +1136,7 @@ public class PlayerConnection implements PacketListenerPlayIn {
|
||||
@@ -1140,6 +1141,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 59eedbe9d249fd09673393651a8be76232ab16e9..f55485094a5b676d8051d1f8d3151340
|
||||
minecraftServer.scheduleOnMain(() -> this.disconnect("Book too large!"));
|
||||
return;
|
||||
}
|
||||
@@ -1158,6 +1160,7 @@ public class PlayerConnection implements PacketListenerPlayIn {
|
||||
@@ -1163,6 +1165,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