Replaced code that used legacy deprecated permissions methods

This commit is contained in:
Tim Visée
2015-11-20 20:23:03 +01:00
parent 33ca2691b2
commit 3500ee6fb7
9 changed files with 20 additions and 16 deletions
@@ -37,7 +37,7 @@ public class ForceLoginCommand extends ExecutableCommand {
sender.sendMessage("Player needs to be online!");
return true;
}
if (!plugin.authmePermissible(player, "authme.canbeforced")) {
if (!plugin.getPermissionsManager().hasPermission(player, "authme.canbeforced")) {
sender.sendMessage("You cannot force login for the player " + playerName + "!");
return true;
}
@@ -105,7 +105,7 @@ public class HelpPrinter {
for(String node : permissions.getPermissionNodes()) {
boolean nodePermission = true;
if(sender instanceof Player)
nodePermission = AuthMe.getInstance().authmePermissible((Player) sender, node);
nodePermission = AuthMe.getInstance().getPermissionsManager().hasPermission((Player) sender, node);
final String nodePermsString = ChatColor.GRAY + (nodePermission ? ChatColor.ITALIC + " (Permission!)" : ChatColor.ITALIC + " (No Permission!)");
sender.sendMessage(" " + ChatColor.YELLOW + ChatColor.ITALIC + node + nodePermsString);
}