mirror of
https://github.com/PurpurMC/Purpur.git
synced 2026-02-19 17:37:42 +01:00
Updated Upstream (Paper)
Upstream has released updates that appear to apply and compile correctly Paper Changes: PaperMC/Paper@d5f1ffc Remove somewhat broken patch
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 89cdf7802920923a2bb87e454d9fcbf47a817890..93995f2b45ce1e8dc3cbca6ac0d4652ac83d3293 100644
|
||||
index 1e78ba1deaae20b700c651dbc8b2f4fa4ccf9ddc..2c073391c51e07031efef02f3a2c27b87d7e41c8 100644
|
||||
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
@@ -1253,10 +1253,12 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
|
||||
@@ -1249,10 +1249,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 89cdf7802920923a2bb87e454d9fcbf47a817890..93995f2b45ce1e8dc3cbca6ac0d4652a
|
||||
server.scheduleOnMain(() -> this.disconnect("Book too large!", org.bukkit.event.player.PlayerKickEvent.Cause.ILLEGAL_ACTION)); // Paper - kick event cause
|
||||
return;
|
||||
}
|
||||
@@ -1280,6 +1282,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
|
||||
@@ -1276,6 +1278,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