Replace command permissions with a new smarter permission system that allows for compound permissions

This commit is contained in:
Alexander Söderberg 2020-09-24 23:18:22 +02:00 committed by Alexander Söderberg
parent ce2fbe9746
commit e8a1a9a6cf
15 changed files with 455 additions and 41 deletions

View file

@ -56,7 +56,7 @@ final class CloudburstCommand<C> extends PluginCommand<Plugin> {
@Nonnull final CloudburstCommandManager<C> manager) {
super(manager.getOwningPlugin(), CommandData.builder(label)
.addAliases(aliases.toArray(new String[0]))
.addPermission(cloudCommand.getCommandPermission())
.addPermission(cloudCommand.getCommandPermission().toString())
.setDescription(cloudCommand.getCommandMeta().getOrDefault("description", ""))
.build());
this.command = command;