Replace command permissions with a new smarter permission system that allows for compound permissions
This commit is contained in:
parent
ce2fbe9746
commit
e8a1a9a6cf
15 changed files with 455 additions and 41 deletions
|
|
@ -152,7 +152,7 @@ final class BukkitCommand<C> extends org.bukkit.command.Command implements Plugi
|
|||
|
||||
@Override
|
||||
public String getPermission() {
|
||||
return this.cloudCommand.getCommandPermission();
|
||||
return this.cloudCommand.getCommandPermission().toString();
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -57,6 +57,7 @@ class CloudCommodoreManager<C> extends BukkitPluginRegistrationHandler<C> {
|
|||
final com.mojang.brigadier.Command<?> cmd = o -> 1;
|
||||
final LiteralCommandNode<?> literalCommandNode = this.brigadierManager
|
||||
.createLiteralCommandNode(label, command, (o, p) -> true, cmd);
|
||||
this.commodore.register(bukkitCommand, literalCommandNode, p -> p.hasPermission(command.getCommandPermission()));
|
||||
this.commodore.register(bukkitCommand, literalCommandNode, p ->
|
||||
p.hasPermission(command.getCommandPermission().toString()));
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue