mirror of
https://github.com/ChestShop-authors/ChestShop-3.git
synced 2024-11-05 10:09:35 +01:00
20 lines
521 B
Java
20 lines
521 B
Java
|
package com.Acrobot.iConomyChestShop;
|
||
|
|
||
|
import com.nijiko.permissions.PermissionHandler;
|
||
|
import org.bukkit.entity.Player;
|
||
|
|
||
|
/**
|
||
|
* @author Acrobot
|
||
|
*/
|
||
|
public class Permission {
|
||
|
public static PermissionHandler permissions;
|
||
|
|
||
|
public static boolean has(Player player, String permission) {
|
||
|
if (permissions != null) {
|
||
|
return permissions.has(player, permission);
|
||
|
} else {
|
||
|
return !permission.contains("exclude") && (!permission.contains("admin") || player.isOp());
|
||
|
}
|
||
|
}
|
||
|
}
|