mirror of
https://github.com/webbukkit/dynmap.git
synced 2024-11-27 20:58:40 +01:00
More sponge perm work on 1.12.2
This commit is contained in:
parent
c258c5efa4
commit
d7c9c59b75
@ -32,31 +32,12 @@ public class Sponge7Permissions implements PermissionProvider {
|
||||
|
||||
@Override
|
||||
public boolean has(ICommandSender sender, String permission) {
|
||||
if(sender instanceof EntityPlayerMP) {
|
||||
boolean rc = false;
|
||||
EntityPlayerMP player = (EntityPlayerMP) sender;
|
||||
Optional<Player> p = Sponge.getServer().getPlayer(player.getUniqueID());
|
||||
if (p.isPresent()) {
|
||||
|
||||
rc = p.get().hasPermission("dynmap." + permission);
|
||||
}
|
||||
return rc;
|
||||
}
|
||||
return true;
|
||||
return sender.canUseCommand(4, "dynmap." + permission);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean hasPermissionNode(ICommandSender sender, String permission) {
|
||||
if(sender instanceof EntityPlayerMP) {
|
||||
boolean rc = false;
|
||||
EntityPlayerMP player = (EntityPlayerMP) sender;
|
||||
Optional<Player> p = Sponge.getServer().getPlayer(player.getUniqueID());
|
||||
if (p.isPresent()) {
|
||||
rc = p.get().hasPermission("dynmap." + permission);
|
||||
}
|
||||
return rc;
|
||||
}
|
||||
return true;
|
||||
return sender.canUseCommand(4, "dynmap." + permission);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
Loading…
Reference in New Issue
Block a user