mirror of
https://github.com/AuthMe/AuthMeReloaded.git
synced 2025-01-11 18:37:35 +01:00
Fixed CommandPermissions class
This commit is contained in:
parent
c193120958
commit
7962d6b9fe
@ -1,7 +1,8 @@
|
||||
package fr.xephi.authme.command;
|
||||
|
||||
import com.timvisee.dungeonmaze.Core;
|
||||
import com.timvisee.dungeonmaze.permission.PermissionsManager;
|
||||
//import com.timvisee.dungeonmaze.Core;
|
||||
//import com.timvisee.dungeonmaze.permission.PermissionsManager;
|
||||
import fr.xephi.authme.AuthMe;
|
||||
import org.bukkit.command.CommandSender;
|
||||
import org.bukkit.entity.Player;
|
||||
|
||||
@ -123,14 +124,14 @@ public class CommandPermissions {
|
||||
// Get the player instance
|
||||
Player player = (Player) sender;
|
||||
|
||||
// Get the permissions manager, and make sure it's instance is valid
|
||||
PermissionsManager permissionsManager = Core.getPermissionsManager();
|
||||
if(permissionsManager == null)
|
||||
return false;
|
||||
// // Get the permissions manager, and make sure it's instance is valid
|
||||
// PermissionsManager permissionsManager = Core.getPermissionsManager();
|
||||
// if(permissionsManager == null)
|
||||
// return false;
|
||||
|
||||
// Check whether the player has permission, return the result
|
||||
for(String node : this.permissionNodes)
|
||||
if(!permissionsManager.hasPermission(player, node, defaultPermission))
|
||||
if(!AuthMe.getInstance().authmePermissible(player, node))
|
||||
return false;
|
||||
return true;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user