mirror of
https://github.com/PurpurMC/Purpur.git
synced 2026-02-18 17:07:43 +01:00
Updated Upstream (Paper)
Upstream has released updates that appear to apply and compile correctly Paper Changes: PaperMC/Paper@c95bc5f Don't unpack loot table for TEs not in world (#9918) PaperMC/Paper@6675d13 Fix strikeLightningEffect powers lightning rods & clears copper (#9780) PaperMC/Paper@63e77b5 Add Enchantment cost API (#9856) PaperMC/Paper@d8847bc Updated Upstream (Bukkit/CraftBukkit) (#9922) PaperMC/Paper@dd47ec6 Add Entity Movement Direction API (#7085) PaperMC/Paper@9ee60ec Add aggressive mob API (#9838) PaperMC/Paper@531ef27 Use ApiStatus.Internal instead of Deprecated (#9042) PaperMC/Paper@9548629 Add hand to fish event for all player interactions (#9929) PaperMC/Paper@aee3830 Deprecate Material#isInteractable (#9216) PaperMC/Paper@a506b48 Fix several issues with EntityBreedEvent (#8677) PaperMC/Paper@f186318 Run the chat callback on the main thread as expected (#9935)
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 d7230d7a0ab8088bfa77d07c2b8cff66953409a9..f221f14c345ec81bc422e0f50d940eb43cdbcc73 100644
|
||||
index 93b81303c6f5a009af7c282435671fd05ca68499..8ed7699d2f8b636cce023c1afe0e196c8361725c 100644
|
||||
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
@@ -1148,10 +1148,15 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
|
||||
@@ -1149,10 +1149,15 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
|
||||
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;
|
||||
@@ -24,7 +24,7 @@ index d7230d7a0ab8088bfa77d07c2b8cff66953409a9..f221f14c345ec81bc422e0f50d940eb4
|
||||
server.scheduleOnMain(() -> this.disconnect("Book too large!", org.bukkit.event.player.PlayerKickEvent.Cause.ILLEGAL_ACTION)); // Paper - kick event cause
|
||||
return;
|
||||
}
|
||||
@@ -1175,6 +1180,7 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
|
||||
@@ -1176,6 +1181,7 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
|
||||
|
||||
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