From 5771bf89f8a30ecbf4564d5aea67bd6814e85813 Mon Sep 17 00:00:00 2001 From: sovdee <10354869+sovdeeth@users.noreply.github.com> Date: Thu, 2 Nov 2023 22:26:03 -0700 Subject: [PATCH] Prevent InventoryHolder -> X chaining --- .../java/ch/njol/skript/classes/data/DefaultConverters.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main/java/ch/njol/skript/classes/data/DefaultConverters.java b/src/main/java/ch/njol/skript/classes/data/DefaultConverters.java index a8b2688e94e..96bc8313b85 100644 --- a/src/main/java/ch/njol/skript/classes/data/DefaultConverters.java +++ b/src/main/java/ch/njol/skript/classes/data/DefaultConverters.java @@ -158,14 +158,14 @@ public DefaultConverters() {} if (holder instanceof DoubleChest) return holder.getInventory().getLocation().getBlock(); return null; - }); + }, Converter.NO_LEFT_CHAINING | Converter.NO_RIGHT_CHAINING); // InventoryHolder - Entity Converters.registerConverter(InventoryHolder.class, Entity.class, holder -> { if (holder instanceof Entity) return (Entity) holder; return null; - }); + }, Converter.NO_LEFT_CHAINING | Converter.NO_RIGHT_CHAINING); // Enchantment - EnchantmentType Converters.registerConverter(Enchantment.class, EnchantmentType.class, e -> new EnchantmentType(e, -1));