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