Class ServiceManager
- java.lang.Object
-
- cc.carm.plugin.userprefix.manager.ServiceManager
-
public class ServiceManager extends Object
服务管理器,旨在于LuckPerms互联,调用其原始接口。
-
-
Constructor Summary
Constructors Constructor Description ServiceManager()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static net.luckperms.api.platform.PlayerAdapter<Player>
getAPI()
static net.luckperms.api.LuckPerms
getService()
static net.luckperms.api.model.user.User
getUser(Player player)
static boolean
hasPermission(net.luckperms.api.model.user.User user, String permission)
通过LuckPermsAPI判断玩家是否有对应的权限static boolean
hasPermission(Player player, String permission)
-
-
-
Method Detail
-
getUser
public static net.luckperms.api.model.user.User getUser(Player player)
-
getService
public static net.luckperms.api.LuckPerms getService()
-
getAPI
public static net.luckperms.api.platform.PlayerAdapter<Player> getAPI()
-
hasPermission
public static boolean hasPermission(net.luckperms.api.model.user.User user, String permission)
通过LuckPermsAPI判断玩家是否有对应的权限- Parameters:
user
- 用户permission
- 权限- Returns:
- true / false
-
-