13
0
geforkt von Mirrors/Paper
Paper/Spigot-Server-Patches/0699-Don-t-ignore-result-of-PlayerEditBookEvent.patch
Josh Roy be13705177
Updated Upstream (CraftBukkit) (#5484)
Upstream has released updates that appear to apply and compile correctly.
This update has not been tested by PaperMC and as with ANY update, please do your own testing

CraftBukkit Changes:
6b8cd9a7 SPIGOT-6207: forcibly drop the items of a converted zombie villager
2021-04-12 02:03:08 +01:00

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/PlayerConnection.java b/src/main/java/net/minecraft/server/network/PlayerConnection.java
index 5ee56f3636b299280a7c2bc5a210c63250a47fb3..e6ea84ba098b4d77bc68e99862992a10ef4585b5 100644
--- a/src/main/java/net/minecraft/server/network/PlayerConnection.java
+++ b/src/main/java/net/minecraft/server/network/PlayerConnection.java
@@ -1144,7 +1144,7 @@ public class PlayerConnection implements PacketListenerPlayIn {
list.stream().map(NBTTagString::a).forEach(nbttaglist::add);
ItemStack old = itemstack.cloneItemStack(); // CraftBukkit
itemstack.a("pages", (NBTBase) 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)
}
}