From 8b12bdc63340c1c0fd3b2bfa59925980b7b7c30f Mon Sep 17 00:00:00 2001 From: Dean <77945073+LeAnhTuan0810@users.noreply.github.com> Date: Fri, 1 Oct 2021 19:49:11 +0700 Subject: [PATCH] Allow other plugin to use event anvil --- .../enchantments/support/merging/anvil/AnvilListeners.java | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/eco-core/core-plugin/src/main/java/com/willfp/ecoenchants/enchantments/support/merging/anvil/AnvilListeners.java b/eco-core/core-plugin/src/main/java/com/willfp/ecoenchants/enchantments/support/merging/anvil/AnvilListeners.java index 11810094..1cd4ed69 100644 --- a/eco-core/core-plugin/src/main/java/com/willfp/ecoenchants/enchantments/support/merging/anvil/AnvilListeners.java +++ b/eco-core/core-plugin/src/main/java/com/willfp/ecoenchants/enchantments/support/merging/anvil/AnvilListeners.java @@ -66,6 +66,10 @@ public class AnvilListeners extends PluginDependent implements Listen ItemStack left = event.getInventory().getItem(0); ItemStack right = event.getInventory().getItem(1); ItemStack out = event.getResult(); + // Allow other plugin to use event anvil + if (out == null) { + return; + } String name = event.getInventory().getRenameText(); if (event.getViewers().isEmpty()) {