add enchant conflict and it's yml and finished material groups yml

This commit is contained in:
alexcrea 2024-02-01 01:29:07 +01:00
parent b6ce69c45b
commit 8ba1b532df
7 changed files with 441 additions and 3 deletions

View file

@ -89,8 +89,11 @@ class AnvilEventListener : Listener {
val inventory = event.inventory as? AnvilInventory ?: return
val output = inventory.getItem(ANVIL_OUTPUT_SLOT) ?: return
if(!player.hasPermission(bypassPermission)){
if (output.findEnchantments().hasConflicts() && !player.hasPermission(requirePermission)) { return }
if (output.findEnchantments().hasConflicts() && !player.hasPermission(requirePermission)) {
return
}
}
if (event.rawSlot != ANVIL_OUTPUT_SLOT) { return }
event.result = Event.Result.ALLOW