mirror of
https://github.com/BentoBoxWorld/BentoBox.git
synced 2025-01-23 16:41:42 +01:00
Fixed issues with permissions for /bentobox commands
- Each /bentobox subcommand now has its own dedicated permission - bentobox.admin is a permission node for most of them - /bentobox about: bentobox.about - /bentobox version: bentobox.version - updated the plugin.yml with the new permissions
This commit is contained in:
parent
880185ad4b
commit
e7f90bbd21
@ -22,7 +22,7 @@ public class BentoBoxAboutCommand extends CompositeCommand {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void setup() {
|
public void setup() {
|
||||||
// Useless : this command uses the default values.
|
setPermission("bentobox.about");
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -20,6 +20,7 @@ public class BentoBoxCatalogCommand extends CompositeCommand {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void setup() {
|
public void setup() {
|
||||||
|
setPermission("bentobox.admin.catalog");
|
||||||
setOnlyPlayer(true);
|
setOnlyPlayer(true);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -24,7 +24,7 @@ public class BentoBoxLocaleCommand extends ConfirmableCommand {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void setup() {
|
public void setup() {
|
||||||
setPermission("admin.locale");
|
setPermission("bentobox.admin.locale");
|
||||||
setDescription("commands.bentobox.locale.description");
|
setDescription("commands.bentobox.locale.description");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -20,6 +20,7 @@ public class BentoBoxManageCommand extends CompositeCommand {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void setup() {
|
public void setup() {
|
||||||
|
setPermission("bentobox.admin.manage");
|
||||||
setOnlyPlayer(true);
|
setOnlyPlayer(true);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -30,7 +30,7 @@ public class BentoBoxMigrateCommand extends ConfirmableCommand {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void setup() {
|
public void setup() {
|
||||||
setPermission("admin.migrate");
|
setPermission("bentobox.admin.migrate");
|
||||||
setDescription("commands.bentobox.migrate.description");
|
setDescription("commands.bentobox.migrate.description");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -26,7 +26,7 @@ public class BentoBoxReloadCommand extends ConfirmableCommand {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void setup() {
|
public void setup() {
|
||||||
setPermission("admin.reload");
|
setPermission("bentobox.admin.reload");
|
||||||
setParametersHelp("commands.bentobox.reload.parameters");
|
setParametersHelp("commands.bentobox.reload.parameters");
|
||||||
setDescription("commands.bentobox.reload.description");
|
setDescription("commands.bentobox.reload.description");
|
||||||
}
|
}
|
||||||
|
@ -33,7 +33,7 @@ public class BentoBoxVersionCommand extends CompositeCommand {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void setup() {
|
public void setup() {
|
||||||
// Not used
|
setPermission("bentobox.version");
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -15,5 +15,27 @@ softdepend: [Vault, PlaceholderAPI, MVdWPlaceholderAPI, dynmap]
|
|||||||
|
|
||||||
permissions:
|
permissions:
|
||||||
bentobox.admin:
|
bentobox.admin:
|
||||||
description: Allow bentobox command usage
|
description: Allows most of bentobox commands usage
|
||||||
default: op
|
default: op
|
||||||
|
children:
|
||||||
|
bentobox.admin.catalog:
|
||||||
|
description: Allows to use /bentobox catalog
|
||||||
|
default: op
|
||||||
|
bentobox.admin.locale:
|
||||||
|
description: Allows to use /bentobox locale
|
||||||
|
default: op
|
||||||
|
bentobox.admin.manage:
|
||||||
|
description: Allows to use /bentobox manage
|
||||||
|
default: op
|
||||||
|
bentobox.admin.migrate:
|
||||||
|
description: Allows to use /bentobox migrate
|
||||||
|
default: op
|
||||||
|
bentobox.admin.reload:
|
||||||
|
description: Allows to use /bentobox reload
|
||||||
|
default: op
|
||||||
|
bentobox.about:
|
||||||
|
description: Allows to use /bentobox about
|
||||||
|
default: true
|
||||||
|
bentobox.version:
|
||||||
|
description: Allows to use /bentobox version
|
||||||
|
default: true
|
||||||
|
Loading…
Reference in New Issue
Block a user