mirror of
https://github.com/AuthMe/AuthMeReloaded.git
synced 2024-12-25 01:57:48 +01:00
Added some comments to legacy permissions methods
This commit is contained in:
parent
3500ee6fb7
commit
a4b2306e16
@ -574,8 +574,10 @@ public class AuthMe extends JavaPlugin {
|
|||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
public boolean authmePermissible(Player player, String perm) {
|
public boolean authmePermissible(Player player, String perm) {
|
||||||
|
// New code:
|
||||||
return getPermissionsManager().hasPermission(player, perm);
|
return getPermissionsManager().hasPermission(player, perm);
|
||||||
|
|
||||||
|
// Legacy code:
|
||||||
/*if (player.hasPermission(perm)) {
|
/*if (player.hasPermission(perm)) {
|
||||||
return true;
|
return true;
|
||||||
} else if (permission != null) {
|
} else if (permission != null) {
|
||||||
@ -592,6 +594,7 @@ public class AuthMe extends JavaPlugin {
|
|||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
public boolean authmePermissible(CommandSender sender, String perm) {
|
public boolean authmePermissible(CommandSender sender, String perm) {
|
||||||
|
// New code:
|
||||||
// Handle players with the permissions manager
|
// Handle players with the permissions manager
|
||||||
if(sender instanceof Player) {
|
if(sender instanceof Player) {
|
||||||
// Get the player instance
|
// Get the player instance
|
||||||
@ -601,7 +604,7 @@ public class AuthMe extends JavaPlugin {
|
|||||||
return getPermissionsManager().hasPermission(player, perm);
|
return getPermissionsManager().hasPermission(player, perm);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Legacy system:
|
// Legacy code:
|
||||||
if (sender.hasPermission(perm)) {
|
if (sender.hasPermission(perm)) {
|
||||||
return true;
|
return true;
|
||||||
} else if (permission != null) {
|
} else if (permission != null) {
|
||||||
|
Loading…
Reference in New Issue
Block a user