3
0
Mirror von https://github.com/PaperMC/Paper.git synchronisiert 2024-11-15 12:30:06 +01:00
Paper/patches/server/0634-Don-t-ignore-result-of-PlayerEditBookEvent.patch
Jason Penilla f6636fca9e
Updated Upstream (Bukkit/CraftBukkit)
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

Bukkit Changes:
ebb0e28d #631: Add Villager#shakeHead
751469c6 #629: Add LivingEntity#isClimbing

CraftBukkit Changes:
622cf611 SPIGOT-6555: Cannot access shield BlockStateMeta
8b2e78ec SPIGOT-6542: Fix counting players with fauxSleeping = true
f66c437a SPIGOT-6561: Add events for dripleaf tilting
6ed40004 SPIGOT-6560: Crash when falling stalactite hits player
72a2901b SPIGOT-6557: PlayerEditBookEvent#setNewBookMeta does not update meta
a07e783a #865: Implement Villager#shakeHead
3252ff18 #863: Add LivingEntity#isClimbing
77058c79 SPIGOT-6554: Worlds created with the bukkit ChunkGenerator cannot save
2021-06-14 21:02:21 -07:00

20 Zeilen
1.1 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 7f7b34cc8a2c5fbf7dff8e785b067cb777808c52..11c2dac045e78b778a82246123ced159bfd2c1de 100644
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
@@ -1191,7 +1191,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Ser
}
itemstack.addTagElement("pages", (Tag) nbttaglist);
- CraftEventFactory.handleEditBookEvent(player, slot, handItem, itemstack); // CraftBukkit
+ this.player.containerMenu.setItem(slot, CraftEventFactory.handleEditBookEvent(player, slot, handItem, itemstack)); // CraftBukkit // Paper - Don't ignore result (see other callsite for handleEditBookEvent)
}
@Override