Mirror von
https://github.com/PaperMC/Paper.git
synchronisiert 2024-12-18 12:30:06 +01:00
Fix "Don't ignore result of PlayerEditBookEvent" (#5923)
Dieser Commit ist enthalten in:
Ursprung
321ddfea3c
Commit
4eae2d8da3
@ -5,7 +5,7 @@ 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
|
diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||||
index 1a0ab16e1337867e982af8cd1a4e646b06c6e8d2..6a40ce317bd0e5a0043cd156d4c32de95d5d2827 100644
|
index 137213a4d98e1405eb34db06614cf245ad72bf98..e65da503059476e7877861ab4fb195324055a7ba 100644
|
||||||
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||||
+++ b/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
|
@@ -1191,7 +1191,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Ser
|
||||||
@ -13,7 +13,7 @@ index 1a0ab16e1337867e982af8cd1a4e646b06c6e8d2..6a40ce317bd0e5a0043cd156d4c32de9
|
|||||||
|
|
||||||
itemstack.addTagElement("pages", (Tag) nbttaglist);
|
itemstack.addTagElement("pages", (Tag) nbttaglist);
|
||||||
- CraftEventFactory.handleEditBookEvent(player, slot, handItem, itemstack); // CraftBukkit
|
- 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)
|
+ this.player.getInventory().setItem(slot, CraftEventFactory.handleEditBookEvent(player, slot, handItem, itemstack)); // CraftBukkit // Paper - Don't ignore result (see other callsite for handleEditBookEvent)
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren