Allow other plugin to use event anvil

This commit is contained in:
Dean 2021-10-01 19:49:11 +07:00 committed by GitHub
parent f51945e7ed
commit 8b12bdc633
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -66,6 +66,10 @@ public class AnvilListeners extends PluginDependent<EcoPlugin> 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()) {