Fixed a couple more bugs

This commit is contained in:
Auxilor 2022-08-31 14:38:05 +01:00
parent 27a7929a17
commit be8614e7b4
2 changed files with 16 additions and 0 deletions

View File

@ -129,10 +129,22 @@ abstract class EcoEnchant(
"Allows getting $id from an Enchanting Table",
PermissionDefault.TRUE
)
if (Bukkit.getPluginManager().getPermission("ecoenchants.fromtable.*") == null) {
Bukkit.getPluginManager().addPermission(
Permission(
"ecoenchants.fromtable.*",
"Allows getting all enchantments from an Enchanting Table",
PermissionDefault.TRUE
)
)
}
permission.addParent(
Bukkit.getPluginManager().getPermission("ecoenchants.fromtable.*")!!,
true
)
Bukkit.getPluginManager().addPermission(permission)
}

View File

@ -153,6 +153,10 @@ object EcoEnchants {
set(null, true)
}
if (enchantment is EcoEnchant) {
removeEnchant(enchantment)
}
Enchantment.registerEnchantment(enchantment)
EnchantRegistrations.registerEnchantments()
}