mirror of
https://github.com/PaperMC/Paper.git
synced 2024-12-23 15:00:30 +01:00
ce0e78c103
compile fixes compile fixes
19 lines
1.3 KiB
Diff
19 lines
1.3 KiB
Diff
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
|
From: Jason Penilla <11360596+jpenilla@users.noreply.github.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 aca572c34e12618fa032344ce5b7d890d75120d0..5f4689c411b3f8e89a018b596fa75c3e8fee408d 100644
|
|
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
|
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
|
@@ -1158,7 +1158,7 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
|
|
List<Filterable<String>> list1 = pages.stream().map(this::filterableFromOutgoing).toList();
|
|
|
|
itemstack.set(DataComponents.WRITABLE_BOOK_CONTENT, new WritableBookContent(list1));
|
|
- CraftEventFactory.handleEditBookEvent(this.player, slotId, handItem, itemstack); // CraftBukkit
|
|
+ this.player.getInventory().setItem(slotId, CraftEventFactory.handleEditBookEvent(this.player, slotId, handItem, itemstack)); // CraftBukkit // Paper - Don't ignore result (see other callsite for handleEditBookEvent)
|
|
}
|
|
}
|
|
|