2022-05-31 20:09:36 +02:00
|
|
|
package wtf.beatrice.hubthat.utils;
|
2020-04-09 16:31:14 +02:00
|
|
|
|
|
|
|
import org.bukkit.command.CommandSender;
|
|
|
|
|
|
|
|
public class PermissionUtils
|
|
|
|
{
|
|
|
|
// Method to get the permission string from the Permissions enum.
|
|
|
|
public static boolean playerHasPermission(CommandSender user, Permissions permission)
|
|
|
|
{
|
|
|
|
if (user != null && user.hasPermission(permission.permission))
|
|
|
|
{
|
|
|
|
return true;
|
|
|
|
}
|
|
|
|
|
|
|
|
return false;
|
|
|
|
}
|
|
|
|
}
|