aboutsummaryrefslogtreecommitdiffhomepage
path: root/paper-server/patches/unapplied/net/minecraft/world/item/WrittenBookItem.java.patch
blob: f29d9ca860477460ae6150f66422df74400241b7 (plain)
1
2
3
4
5
6
7
8
9
10
11
--- a/net/minecraft/world/item/WrittenBookItem.java
+++ b/net/minecraft/world/item/WrittenBookItem.java
@@ -41,7 +41,7 @@
 
     public static boolean resolveBookComponents(ItemStack book, CommandSourceStack commandSource, @Nullable Player player) {
         WrittenBookContent writtenBookContent = book.get(DataComponents.WRITTEN_BOOK_CONTENT);
-        if (writtenBookContent != null && !writtenBookContent.resolved()) {
+        if (io.papermc.paper.configuration.GlobalConfiguration.get().itemValidation.resolveSelectorsInBooks && writtenBookContent != null && !writtenBookContent.resolved()) { // Paper - Disable component selector resolving in books by default
             WrittenBookContent writtenBookContent2 = writtenBookContent.resolve(commandSource, player);
             if (writtenBookContent2 != null) {
                 book.set(DataComponents.WRITTEN_BOOK_CONTENT, writtenBookContent2);