mirror of
https://github.com/KAMKEEL/CustomNPC-Plus.git
synced 2026-11-18 12:39:05 +00:00
Better Permission handling for /KAMKEEL Commands
This commit is contained in:
1 parent
b04ac96690
commit
314bc462f0
3 files changed
+54
-2
No files matched your search
@@ -80,6 +80,13 @@ public class CustomNpcsPermissions{
|
||||
return true;
|
||||
}
|
||||
|
||||
public static boolean hasCustomPermission(EntityPlayer player, String permission){
|
||||
if(Instance.bukkit != null){
|
||||
return Instance.bukkitPermission(player.getCommandSenderName(), permission);
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
private boolean bukkitPermission(String username, String permission) {
|
||||
try {
|
||||
Object player = getPlayer.invoke(null, username);
|
||||
|
||||
Reference in new issue
Block a user