Fix bugs in purge classes, cleanup
- OfflinePlayer objects were never mapped to names - Essentials purge was run even if setting was disabled - Console user saw messages twice - Misc: trivial field reorderings, change DefaultPermission to be null safe - Permissions: do not expose PermissionHandler just to get its type
This commit is contained in:
@@ -1,6 +1,5 @@
|
||||
package fr.xephi.authme.permission;
|
||||
|
||||
import org.bukkit.Bukkit;
|
||||
import org.bukkit.command.CommandSender;
|
||||
|
||||
/**
|
||||
@@ -30,8 +29,8 @@ public enum DefaultPermission {
|
||||
|
||||
@Override
|
||||
public boolean evaluateOffline(String name) {
|
||||
// TODO Gnat008 20160617: Is this safe?
|
||||
return Bukkit.getOfflinePlayer(name).isOp();
|
||||
// TODO #784: Check if there is an elegant way to evaluate OP status
|
||||
return false;
|
||||
}
|
||||
},
|
||||
|
||||
|
||||
@@ -217,12 +217,12 @@ public class PermissionsManager {
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the current permissions system handler.
|
||||
* Return the permissions system that is hooked into.
|
||||
*
|
||||
* @return The permissions system handler.
|
||||
* @return The permissions system, or null.
|
||||
*/
|
||||
public PermissionHandler getHandler() {
|
||||
return handler;
|
||||
public PermissionsSystemType getPermissionSystem() {
|
||||
return isEnabled() ? handler.getPermissionSystem() : null;
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user