mirror of
https://github.com/PaperMC/Paper.git
synced 2024-12-28 23:38:25 +01:00
fix book page limit length (#4932)
This commit is contained in:
parent
ec665f60d2
commit
5583c8c007
1 changed files with 1 additions and 1 deletions
|
@ -41,7 +41,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
|||
+ ItemStack testStack = packetplayinbedit.getBook();
|
||||
+ if (!server.isPrimaryThread() && !testStack.isEmpty() && testStack.getTag() != null) {
|
||||
+ NBTTagList pageList = testStack.getTag().getList("pages", 8);
|
||||
+ if (pageList.size() > 50) {
|
||||
+ if (pageList.size() > 100) {
|
||||
+ PlayerConnection.LOGGER.warn(this.player.getName() + " tried to send a book with too many pages");
|
||||
+ minecraftServer.scheduleOnMain(() -> this.disconnect("Book too large!"));
|
||||
+ return;
|
||||
|
|
Loading…
Reference in a new issue