3
0
Mirror von https://github.com/PaperMC/Paper.git synchronisiert 2024-11-15 04:20:04 +01:00
Paper/Spigot-Server-Patches/0698-Don-t-ignore-result-of-PlayerEditBookEvent.patch
Aikar 976c6d425b
[CI-SKIP] [Auto] Rebuild Patches
A recent commit has been made that caused patches to be out of order, rebuilding
2021-05-02 15:37:24 -04: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 c6a65467d2d096d471ce5c4d761dc69d60644b75..6ad075907d56a8f41ca3a7b82ff90a6d3ad9f1d4 100644
--- a/src/main/java/net/minecraft/server/network/PlayerConnection.java
+++ b/src/main/java/net/minecraft/server/network/PlayerConnection.java
@@ -1146,7 +1146,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)
}
}