Update enchantment squared.

This commit is contained in:
alexcrea 2024-07-11 16:54:50 +02:00
parent de5fa240a1
commit ff60e2bef7
No known key found for this signature in database
GPG key ID: 43FD265DB0DBF91F
3 changed files with 2 additions and 9 deletions

Binary file not shown.

View file

@ -38,14 +38,7 @@ public class CAEnchantSquaredEnchantment extends CAEnchantmentBase {
@Override
public boolean isAllowed(@NotNull HumanEntity human) {
if(human instanceof Player player){
return this.enchant.hasPermission(player);
}
// Not really ideal for maintainability but will probably never be executed. (At least I hope)
boolean required = CustomEnchantManager.getInstance().isRequirePermissions();
if (!required) return true;
return human.hasPermission("es.enchant.*") || !human.hasPermission(this.enchant.getRequiredPermission());
return this.enchant.hasPermission(human);
}
@Override

View file

@ -175,7 +175,7 @@ class EnchantmentSquaredDependency(private val enchantmentSquaredPlugin: Plugin)
"SHEARS" -> "shears"
"FLINTANDSTEEL" -> "flint_and_steel"
"FISHINGROD" -> "fishing_rod"
"ELYTRA" -> "elytra"
"ELYTRA", "ELYTRAS" -> "elytra"
"PICKAXES" -> "pickaxes" // not on this plugin by default
"AXES" -> "axes"
"SHOVELS" -> "shovels" // not on this plugin by default