From f17f67227f7d4ab08954f377eeb3f150a617f3d2 Mon Sep 17 00:00:00 2001 From: Auxilor Date: Wed, 27 Apr 2022 13:16:53 +0100 Subject: [PATCH] Commented CustomItem --- .../src/main/java/com/willfp/eco/core/items/CustomItem.java | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/eco-api/src/main/java/com/willfp/eco/core/items/CustomItem.java b/eco-api/src/main/java/com/willfp/eco/core/items/CustomItem.java index 4c33a260..6b493cff 100644 --- a/eco-api/src/main/java/com/willfp/eco/core/items/CustomItem.java +++ b/eco-api/src/main/java/com/willfp/eco/core/items/CustomItem.java @@ -48,6 +48,11 @@ public class CustomItem implements TestableItem { this.test = test; this.item = item; + /* + This runs the next tick, because it's very likely that the test can't return true + immediately after due to registration order; so eco waits until the item should be + working in order to check. + */ Eco.getHandler().getEcoPlugin().getScheduler().runLater(() -> { if (!matches(getItem())) { Bukkit.getLogger().severe("Item with key " + key + " is invalid!");