mirror of
https://github.com/alexcrea/CustomAnvil.git
synced 2026-06-23 16:16:17 +02:00
Update enchantment squared.
This commit is contained in:
parent
de5fa240a1
commit
ff60e2bef7
3 changed files with 2 additions and 9 deletions
Binary file not shown.
|
|
@ -38,14 +38,7 @@ public class CAEnchantSquaredEnchantment extends CAEnchantmentBase {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean isAllowed(@NotNull HumanEntity human) {
|
public boolean isAllowed(@NotNull HumanEntity human) {
|
||||||
if(human instanceof Player player){
|
return this.enchant.hasPermission(human);
|
||||||
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());
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
|
||||||
|
|
@ -175,7 +175,7 @@ class EnchantmentSquaredDependency(private val enchantmentSquaredPlugin: Plugin)
|
||||||
"SHEARS" -> "shears"
|
"SHEARS" -> "shears"
|
||||||
"FLINTANDSTEEL" -> "flint_and_steel"
|
"FLINTANDSTEEL" -> "flint_and_steel"
|
||||||
"FISHINGROD" -> "fishing_rod"
|
"FISHINGROD" -> "fishing_rod"
|
||||||
"ELYTRA" -> "elytra"
|
"ELYTRA", "ELYTRAS" -> "elytra"
|
||||||
"PICKAXES" -> "pickaxes" // not on this plugin by default
|
"PICKAXES" -> "pickaxes" // not on this plugin by default
|
||||||
"AXES" -> "axes"
|
"AXES" -> "axes"
|
||||||
"SHOVELS" -> "shovels" // not on this plugin by default
|
"SHOVELS" -> "shovels" // not on this plugin by default
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue