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 e385bad877dd7ab529e67a7dced5b53a0f55d795..8eef1b90b124d366970be0e90ff6c81581aaed29 100644 --- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java +++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java @@ -1152,7 +1152,7 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl List> list1 = pages.stream().map(this::filterableFromOutgoing).toList(); itemstack.set(DataComponents.WRITABLE_BOOK_CONTENT, new WritableBookContent(list1)); - CraftEventFactory.handleEditBookEvent(this.player, slotId, handItem, itemstack); // CraftBukkit + this.player.getInventory().setItem(slotId, CraftEventFactory.handleEditBookEvent(this.player, slotId, handItem, itemstack)); // CraftBukkit // Paper - Don't ignore result (see other callsite for handleEditBookEvent) } }