geforkt von Mirrors/Paper
a207d14a0e
Signed-off-by: Mariell Hoversholm <proximyst@proximyst.com>
20 Zeilen
1.2 KiB
Diff
20 Zeilen
1.2 KiB
Diff
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
|
From: jmp <jasonpenilla2@me.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 1add53082ab9382cb2e90dc8305b8c71ef1c6a46..65afc23f4791aca19bff78ed86b3b0d31fa81977 100644
|
|
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
|
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
|
@@ -1144,7 +1144,7 @@ public class ServerGamePacketListenerImpl implements ServerGamePacketListener {
|
|
list.stream().map(StringTag::valueOf).forEach(nbttaglist::add);
|
|
ItemStack old = itemstack.copy(); // CraftBukkit
|
|
itemstack.addTagElement("pages", (Tag) nbttaglist);
|
|
- CraftEventFactory.handleEditBookEvent(player, i, old, itemstack); // CraftBukkit
|
|
+ this.player.inventory.setItem(i, CraftEventFactory.handleEditBookEvent(player, i, old, itemstack)); // CraftBukkit // Paper - Don't ignore result (see other callsite for handleEditBookEvent)
|
|
}
|
|
}
|
|
|