mirror of
https://github.com/PaperMC/Paper.git
synced 2024-11-23 11:06:29 +01:00
41647af74c
We cannot put blocking network I/O onto the worldgen threads, this will crash the server if it stalls
20 lines
1.1 KiB
Diff
20 lines
1.1 KiB
Diff
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
|
From: Jason Penilla <11360596+jpenilla@users.noreply.github.com>
|
|
Date: Mon, 5 Apr 2021 18:35:15 -0700
|
|
Subject: [PATCH] Don't ignore result of PlayerEditBookEvent
|
|
|
|
|
|
diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
|
index a45b2909300e0a66d92702eb85e541e621d27fea..f582c7c41022c8b94ea6c7bc0ac9312499e7c434 100644
|
|
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
|
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
|
@@ -1221,7 +1221,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Ser
|
|
}
|
|
|
|
itemstack.addTagElement("pages", nbttaglist);
|
|
- CraftEventFactory.handleEditBookEvent(player, slot, handItem, itemstack); // CraftBukkit
|
|
+ this.player.getInventory().setItem(slot, CraftEventFactory.handleEditBookEvent(player, slot, handItem, itemstack)); // CraftBukkit // Paper - Don't ignore result (see other callsite for handleEditBookEvent)
|
|
}
|
|
|
|
@Override
|