mirror of
https://github.com/PurpurMC/Purpur.git
synced 2026-02-17 16:37:43 +01:00
Updated Upstream (Paper)
Upstream has released updates that appear to apply and compile correctly Paper Changes: PaperMC/Paper@2fa8efc Updated Upstream (Bukkit/CraftBukkit) (#9485) PaperMC/Paper@508a295 Only erase allay memory on non-item targets (#9570) PaperMC/Paper@31358d5 API for updating recipes on clients (#6463) PaperMC/Paper@8fe8ca6 Add clickable version on version command (#9347) PaperMC/Paper@d6d2b6f Only capture actual tree growth (#6464)
This commit is contained in:
@@ -5,10 +5,10 @@ Subject: [PATCH] PlayerBookTooLargeEvent
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
index f106638020d94499601ac21d5c958ada3ddc3ea8..6d192a45f73c8a4dc2cd5f76bb081ae700dc188e 100644
|
||||
index 353d50dd927678618a8d7122d7f3ca0be2f39a64..2d747b24d25683d0b5e96a9eea06abd031f158e6 100644
|
||||
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
@@ -1265,10 +1265,12 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
|
||||
@@ -1267,10 +1267,12 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
|
||||
int maxBookPageSize = io.papermc.paper.configuration.GlobalConfiguration.get().itemValidation.bookSize.pageMax;
|
||||
double multiplier = Math.max(0.3D, Math.min(1D, io.papermc.paper.configuration.GlobalConfiguration.get().itemValidation.bookSize.totalMultiplier));
|
||||
long byteAllowed = maxBookPageSize;
|
||||
@@ -21,7 +21,7 @@ index f106638020d94499601ac21d5c958ada3ddc3ea8..6d192a45f73c8a4dc2cd5f76bb081ae7
|
||||
server.scheduleOnMain(() -> this.disconnect("Book too large!", org.bukkit.event.player.PlayerKickEvent.Cause.ILLEGAL_ACTION)); // Paper - kick event cause
|
||||
return;
|
||||
}
|
||||
@@ -1292,6 +1294,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
|
||||
@@ -1294,6 +1296,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
|
||||
|
||||
if (byteTotal > byteAllowed) {
|
||||
ServerGamePacketListenerImpl.LOGGER.warn(this.player.getScoreboardName() + " tried to send too large of a book. Book Size: " + byteTotal + " - Allowed: "+ byteAllowed + " - Pages: " + pageList.size());
|
||||
|
||||
Reference in New Issue
Block a user