mirror of
https://github.com/PurpurMC/Purpur.git
synced 2026-02-19 09:27:43 +01:00
Updated Upstream (Paper)
Upstream has released updates that appear to apply and compile correctly Paper Changes: PaperMC/Paper@7a96bf2 Make debug dump file names consistent (#9075) PaperMC/Paper@1704bf7 Edit Paper download link in README (#9077) PaperMC/Paper@5fb3ab0 Allow non player entities in scoreboards by default (#9082) PaperMC/Paper@dc08c74 Remove duplicate animate packet for records (#8600) PaperMC/Paper@50e683d Added a config option for ticking markers (#9034) PaperMC/Paper@1d2fe64 fix: null SpawnReason for new player (#9015) PaperMC/Paper@9893e2b Deprecate ChatColor (#9069) PaperMC/Paper@0849144 Do not send expired keys to players on login (#9090) PaperMC/Paper@641dafd Cleanup some patches (#9093) PaperMC/Paper@497b919 Fix ignoreCancelled having no effect on events registered by direct EventExecutor (#9099)
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 f82e2a6e3803645ec002afeb62ccb44c5ec15fde..fb9a1cacc6246a822931d6dd71c092a2f7048712 100644
|
||||
index f78fe22022d9b2718613ed8822b51449061fcdaa..9871c168cb9ac20127aa5bb61b5d46ffec1af753 100644
|
||||
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
@@ -1252,10 +1252,12 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
|
||||
@@ -1260,10 +1260,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 f82e2a6e3803645ec002afeb62ccb44c5ec15fde..fb9a1cacc6246a822931d6dd71c092a2
|
||||
server.scheduleOnMain(() -> this.disconnect("Book too large!", org.bukkit.event.player.PlayerKickEvent.Cause.ILLEGAL_ACTION)); // Paper - kick event cause
|
||||
return;
|
||||
}
|
||||
@@ -1279,6 +1281,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
|
||||
@@ -1287,6 +1289,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