Skip to content

Instantly share code, notes, and snippets.

Created August 24, 2011 22:02
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save anonymous/1169387 to your computer and use it in GitHub Desktop.
Save anonymous/1169387 to your computer and use it in GitHub Desktop.
public static Boolean playerCan(CommandSender sender, String node) {
if (!(sender instanceof Player)) {
return true;
} else {
Player player = (Player) sender;
if (!(lick.permissionHandler == null)) {
if (lick.permissionHandler.has(player, "lick.install")) {
return true;
} else {
return false;
}
} else {
if (player.hasPermission("lick.install")) {
return true;
} else {
return false;
}
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment