mirror of
https://github.com/ChestShop-authors/ChestShop-3.git
synced 2024-09-27 14:13:05 +02:00
Fix other name permission check if admin permission is set
Also explicitly check for star permission to be compatible with no/non-wildcard permission plugin setups
This commit is contained in:
parent
eb6a45c317
commit
5ee8fc1cf8
@ -48,11 +48,7 @@ public enum Permission {
|
||||
}
|
||||
|
||||
public static boolean otherName(Player player, String name) {
|
||||
if (has(player, Permission.ADMIN)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
return hasPermissionSet(player, OTHER_NAME + name) || hasPermissionSet(player, OTHER_NAME + name.toLowerCase());
|
||||
return hasPermissionSet(player, OTHER_NAME + "*") || hasPermissionSet(player, OTHER_NAME + name) || hasPermissionSet(player, OTHER_NAME + name.toLowerCase());
|
||||
}
|
||||
|
||||
private static boolean hasPermissionSet(CommandSender sender, String permission) {
|
||||
|
Loading…
Reference in New Issue
Block a user