From a4b2306e166e113077c75a524da8e343a61af390 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tim=20Vis=C3=A9e?= Date: Fri, 20 Nov 2015 20:23:52 +0100 Subject: [PATCH] Added some comments to legacy permissions methods --- src/main/java/fr/xephi/authme/AuthMe.java | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/main/java/fr/xephi/authme/AuthMe.java b/src/main/java/fr/xephi/authme/AuthMe.java index 30f680162..fd9bb52f4 100644 --- a/src/main/java/fr/xephi/authme/AuthMe.java +++ b/src/main/java/fr/xephi/authme/AuthMe.java @@ -574,8 +574,10 @@ public class AuthMe extends JavaPlugin { * @return */ public boolean authmePermissible(Player player, String perm) { + // New code: return getPermissionsManager().hasPermission(player, perm); + // Legacy code: /*if (player.hasPermission(perm)) { return true; } else if (permission != null) { @@ -592,6 +594,7 @@ public class AuthMe extends JavaPlugin { * @return */ public boolean authmePermissible(CommandSender sender, String perm) { + // New code: // Handle players with the permissions manager if(sender instanceof Player) { // Get the player instance @@ -601,7 +604,7 @@ public class AuthMe extends JavaPlugin { return getPermissionsManager().hasPermission(player, perm); } - // Legacy system: + // Legacy code: if (sender.hasPermission(perm)) { return true; } else if (permission != null) {