mirror of
https://github.com/zDevelopers/ImageOnMap.git
synced 2024-11-22 18:16:21 +01:00
* BUG: Fix command permissions management.
This commit is contained in:
parent
2a49d94d1e
commit
ce61923268
@ -30,6 +30,8 @@ import org.bukkit.entity.Player;
|
|||||||
|
|
||||||
abstract public class Command
|
abstract public class Command
|
||||||
{
|
{
|
||||||
|
static private final String IMAGEONMAP_GLOBAL_PERMISSION = "imageonmap.userender";
|
||||||
|
|
||||||
protected final Commands commandGroup;
|
protected final Commands commandGroup;
|
||||||
protected final String commandName;
|
protected final String commandName;
|
||||||
protected final String usageParameters;
|
protected final String usageParameters;
|
||||||
@ -57,7 +59,8 @@ abstract public class Command
|
|||||||
|
|
||||||
public boolean canExecute(CommandSender sender)
|
public boolean canExecute(CommandSender sender)
|
||||||
{
|
{
|
||||||
return sender.hasPermission("commandtools." + commandGroup.getUsualName());
|
return sender.hasPermission("imageonmap." + commandGroup.getUsualName())
|
||||||
|
|| sender.hasPermission(IMAGEONMAP_GLOBAL_PERMISSION);
|
||||||
}
|
}
|
||||||
|
|
||||||
protected List<String> complete() throws CommandException
|
protected List<String> complete() throws CommandException
|
||||||
|
Loading…
Reference in New Issue
Block a user