Revert "Made BentoBoxCommand#setup() default (#1258)"
This reverts commit 7de842e284
.
This commit is contained in:
parent
5b01f39f9e
commit
b29da53f43
|
@ -12,10 +12,16 @@ import world.bentobox.bentobox.api.user.User;
|
|||
public interface BentoBoxCommand {
|
||||
|
||||
/**
|
||||
* Setups anything that is needed for this command before it is entirely initialized.
|
||||
* It is most notably recommended to specify in this method any custom help subcommand you might want to use for this command.
|
||||
* Setups anything that is needed for this command.
|
||||
* <br/><br/>
|
||||
* It is recommended you do the following in this method:
|
||||
* <ul>
|
||||
* <li>Register any of the sub-commands of this command;</li>
|
||||
* <li>Define the permission required to use this command using {@link CompositeCommand#setPermission(String)};</li>
|
||||
* <li>Define whether this command can only be run by players or not using {@link CompositeCommand#setOnlyPlayer(boolean)};</li>
|
||||
* </ul>
|
||||
*/
|
||||
default void setup() {}
|
||||
void setup();
|
||||
|
||||
/**
|
||||
* Returns whether the command can be executed by this user or not.
|
||||
|
|
|
@ -21,6 +21,10 @@ public class AdminDeleteCommand extends ConfirmableCommand {
|
|||
|
||||
public AdminDeleteCommand(CompositeCommand parent) {
|
||||
super(parent, "delete");
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setup() {
|
||||
setPermission("admin.delete");
|
||||
setParametersHelp("commands.admin.delete.parameters");
|
||||
setDescription("commands.admin.delete.description");
|
||||
|
|
|
@ -18,6 +18,10 @@ public class AdminEmptyTrashCommand extends ConfirmableCommand {
|
|||
*/
|
||||
public AdminEmptyTrashCommand(CompositeCommand parent) {
|
||||
super(parent, "emptytrash");
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setup() {
|
||||
setPermission("admin.trash");
|
||||
setOnlyPlayer(false);
|
||||
setParametersHelp("commands.admin.emptytrash.parameters");
|
||||
|
|
|
@ -28,6 +28,10 @@ public class AdminGetrankCommand extends CompositeCommand {
|
|||
|
||||
public AdminGetrankCommand(CompositeCommand adminCommand) {
|
||||
super(adminCommand, "getrank");
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setup() {
|
||||
setPermission("admin.getrank");
|
||||
setOnlyPlayer(false);
|
||||
setParametersHelp("commands.admin.getrank.parameters");
|
||||
|
|
|
@ -15,6 +15,10 @@ public class AdminInfoCommand extends CompositeCommand {
|
|||
|
||||
public AdminInfoCommand(CompositeCommand parent) {
|
||||
super(parent, "info");
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setup() {
|
||||
setPermission("mod.info");
|
||||
setOnlyPlayer(false);
|
||||
setParametersHelp("commands.admin.info.parameters");
|
||||
|
|
|
@ -21,6 +21,10 @@ public class AdminRegisterCommand extends ConfirmableCommand {
|
|||
|
||||
public AdminRegisterCommand(CompositeCommand parent) {
|
||||
super(parent, "register");
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setup() {
|
||||
setPermission("admin.register");
|
||||
setOnlyPlayer(true);
|
||||
setParametersHelp("commands.admin.register.parameters");
|
||||
|
|
|
@ -14,6 +14,10 @@ public class AdminReloadCommand extends CompositeCommand {
|
|||
|
||||
public AdminReloadCommand(CompositeCommand adminCommand) {
|
||||
super(adminCommand, "reload", "rl");
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setup() {
|
||||
// Permission
|
||||
setPermission("admin.reload");
|
||||
setDescription("commands.admin.reload.description");
|
||||
|
|
|
@ -27,6 +27,10 @@ public class AdminResetFlagsCommand extends ConfirmableCommand {
|
|||
options = getPlugin().getFlagsManager().getFlags().stream()
|
||||
.filter(f -> f.getType().equals(Type.PROTECTION) || f.getType().equals(Type.SETTING))
|
||||
.map(Flag::getID).collect(Collectors.toList());
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setup() {
|
||||
setPermission("admin.resetflags");
|
||||
setOnlyPlayer(false);
|
||||
setParametersHelp("commands.admin.resetflags.parameters");
|
||||
|
|
|
@ -29,6 +29,10 @@ public class AdminSetrankCommand extends CompositeCommand {
|
|||
|
||||
public AdminSetrankCommand(CompositeCommand adminCommand) {
|
||||
super(adminCommand, "setrank");
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setup() {
|
||||
setPermission("admin.setrank");
|
||||
setOnlyPlayer(false);
|
||||
setParametersHelp("commands.admin.setrank.parameters");
|
||||
|
|
|
@ -23,6 +23,10 @@ public class AdminSetspawnCommand extends ConfirmableCommand {
|
|||
|
||||
public AdminSetspawnCommand(CompositeCommand parent) {
|
||||
super(parent, "setspawn");
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setup() {
|
||||
setPermission("admin.setspawn");
|
||||
setOnlyPlayer(true);
|
||||
setDescription("commands.admin.setspawn.description");
|
||||
|
|
|
@ -24,6 +24,10 @@ public class AdminSettingsCommand extends CompositeCommand {
|
|||
|
||||
public AdminSettingsCommand(CompositeCommand islandCommand) {
|
||||
super(islandCommand, "settings", "flags", "options");
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setup() {
|
||||
setPermission("admin.settings");
|
||||
setOnlyPlayer(true);
|
||||
setParametersHelp("commands.admin.settings.parameters");
|
||||
|
|
|
@ -22,6 +22,10 @@ public class AdminSwitchCommand extends ConfirmableCommand {
|
|||
public AdminSwitchCommand(CompositeCommand parent) {
|
||||
super(parent, "switch");
|
||||
bypassPerm = getPermissionPrefix() + "mod.bypassprotect";
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setup() {
|
||||
setPermission("mod.switch");
|
||||
setOnlyPlayer(true);
|
||||
setParametersHelp("commands.admin.switch.parameters");
|
||||
|
|
|
@ -26,6 +26,10 @@ public class AdminSwitchtoCommand extends ConfirmableCommand {
|
|||
public AdminSwitchtoCommand(CompositeCommand parent) {
|
||||
super(parent, "switchto");
|
||||
islands = new ArrayList<>();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setup() {
|
||||
setPermission("admin.switchto");
|
||||
setOnlyPlayer(false);
|
||||
setParametersHelp("commands.admin.switchto.parameters");
|
||||
|
|
|
@ -26,6 +26,10 @@ public class AdminTeleportCommand extends CompositeCommand {
|
|||
*/
|
||||
public AdminTeleportCommand(CompositeCommand parent, String tpCommand) {
|
||||
super(parent, tpCommand);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setup() {
|
||||
// Permission
|
||||
setPermission("admin.tp");
|
||||
setParametersHelp("commands.admin.tp.parameters");
|
||||
|
|
|
@ -17,6 +17,10 @@ public class AdminTrashCommand extends CompositeCommand {
|
|||
*/
|
||||
public AdminTrashCommand(CompositeCommand parent) {
|
||||
super(parent, "trash");
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setup() {
|
||||
setPermission("admin.trash");
|
||||
setOnlyPlayer(false);
|
||||
setParametersHelp("commands.admin.trash.parameters");
|
||||
|
|
|
@ -18,6 +18,10 @@ public class AdminUnregisterCommand extends ConfirmableCommand {
|
|||
|
||||
public AdminUnregisterCommand(CompositeCommand parent) {
|
||||
super(parent, "unregister");
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setup() {
|
||||
setPermission("admin.unregister");
|
||||
setParametersHelp("commands.admin.unregister.parameters");
|
||||
setDescription("commands.admin.unregister.description");
|
||||
|
|
|
@ -10,6 +10,10 @@ public class AdminVersionCommand extends CompositeCommand {
|
|||
|
||||
public AdminVersionCommand(CompositeCommand adminCommand) {
|
||||
super(adminCommand, "version", "v", "ver");
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setup() {
|
||||
// Permission
|
||||
setPermission("admin.version");
|
||||
setDescription("commands.admin.version.description");
|
||||
|
|
|
@ -18,6 +18,10 @@ public class AdminWhyCommand extends ConfirmableCommand {
|
|||
|
||||
public AdminWhyCommand(CompositeCommand parent) {
|
||||
super(parent, "why");
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setup() {
|
||||
setPermission("admin.why");
|
||||
setParametersHelp("commands.admin.why.parameters");
|
||||
setDescription("commands.admin.why.description");
|
||||
|
|
|
@ -29,6 +29,10 @@ public class AdminBlueprintCommand extends ConfirmableCommand {
|
|||
|
||||
public AdminBlueprintCommand(CompositeCommand parent) {
|
||||
super(parent, "blueprint", "bp", "blu");
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setup() {
|
||||
setPermission("admin.blueprint");
|
||||
setParametersHelp("commands.admin.blueprint.parameters");
|
||||
setDescription("commands.admin.blueprint.description");
|
||||
|
|
|
@ -10,6 +10,10 @@ public class AdminBlueprintCopyCommand extends CompositeCommand {
|
|||
|
||||
public AdminBlueprintCopyCommand(AdminBlueprintCommand parent) {
|
||||
super(parent, "copy");
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setup() {
|
||||
inheritPermission();
|
||||
setParametersHelp("commands.admin.blueprint.copy.parameters");
|
||||
setDescription("commands.admin.blueprint.copy.description");
|
||||
|
|
|
@ -18,6 +18,10 @@ public class AdminBlueprintDeleteCommand extends ConfirmableCommand {
|
|||
|
||||
public AdminBlueprintDeleteCommand(AdminBlueprintCommand parent) {
|
||||
super(parent, "delete", "remove");
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setup() {
|
||||
inheritPermission();
|
||||
setParametersHelp("commands.admin.blueprint.delete.parameters");
|
||||
setDescription("commands.admin.blueprint.delete.description");
|
||||
|
|
|
@ -15,6 +15,11 @@ public class AdminBlueprintListCommand extends CompositeCommand {
|
|||
|
||||
public AdminBlueprintListCommand(AdminBlueprintCommand parent) {
|
||||
super(parent, "list");
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public void setup() {
|
||||
inheritPermission();
|
||||
setDescription("commands.admin.blueprint.list.description");
|
||||
}
|
||||
|
|
|
@ -13,6 +13,10 @@ public class AdminBlueprintLoadCommand extends CompositeCommand {
|
|||
|
||||
public AdminBlueprintLoadCommand(AdminBlueprintCommand parent) {
|
||||
super(parent, "load");
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setup() {
|
||||
inheritPermission();
|
||||
setParametersHelp("commands.admin.blueprint.load.parameters");
|
||||
setDescription("commands.admin.blueprint.load.description");
|
||||
|
|
|
@ -14,6 +14,10 @@ public class AdminBlueprintOriginCommand extends CompositeCommand {
|
|||
|
||||
public AdminBlueprintOriginCommand(AdminBlueprintCommand parent) {
|
||||
super(parent, "origin");
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setup() {
|
||||
inheritPermission();
|
||||
setParametersHelp("commands.admin.blueprint.origin.parameters");
|
||||
setDescription("commands.admin.blueprint.origin.description");
|
||||
|
|
|
@ -11,6 +11,10 @@ public class AdminBlueprintPasteCommand extends CompositeCommand {
|
|||
|
||||
public AdminBlueprintPasteCommand(AdminBlueprintCommand parent) {
|
||||
super(parent, "paste");
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setup() {
|
||||
inheritPermission();
|
||||
setParametersHelp("commands.admin.blueprint.paste.parameters");
|
||||
setDescription("commands.admin.blueprint.paste.description");
|
||||
|
|
|
@ -11,6 +11,10 @@ public class AdminBlueprintPos1Command extends CompositeCommand {
|
|||
|
||||
public AdminBlueprintPos1Command(AdminBlueprintCommand parent) {
|
||||
super(parent, "pos1");
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setup() {
|
||||
inheritPermission();
|
||||
setParametersHelp("commands.admin.blueprint.pos1.parameters");
|
||||
setDescription("commands.admin.blueprint.pos1.description");
|
||||
|
|
|
@ -11,6 +11,10 @@ public class AdminBlueprintPos2Command extends CompositeCommand {
|
|||
|
||||
public AdminBlueprintPos2Command(AdminBlueprintCommand parent) {
|
||||
super(parent, "pos2");
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setup() {
|
||||
inheritPermission();
|
||||
setParametersHelp("commands.admin.blueprint.pos2.parameters");
|
||||
setDescription("commands.admin.blueprint.pos2.description");
|
||||
|
|
|
@ -19,6 +19,10 @@ public class AdminBlueprintRenameCommand extends ConfirmableCommand {
|
|||
|
||||
public AdminBlueprintRenameCommand(AdminBlueprintCommand parent) {
|
||||
super(parent, "rename");
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setup() {
|
||||
inheritPermission();
|
||||
setParametersHelp("commands.admin.blueprint.rename.parameters");
|
||||
setDescription("commands.admin.blueprint.rename.description");
|
||||
|
|
|
@ -14,6 +14,10 @@ public class AdminBlueprintSaveCommand extends ConfirmableCommand {
|
|||
|
||||
public AdminBlueprintSaveCommand(AdminBlueprintCommand parent) {
|
||||
super(parent, "save");
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setup() {
|
||||
inheritPermission();
|
||||
setParametersHelp("commands.admin.blueprint.save.parameters");
|
||||
setDescription("commands.admin.blueprint.save.description");
|
||||
|
|
|
@ -18,6 +18,10 @@ public class AdminDeathsAddCommand extends CompositeCommand {
|
|||
|
||||
public AdminDeathsAddCommand(AdminDeathsCommand parent) {
|
||||
super(parent, "add");
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setup() {
|
||||
inheritPermission();
|
||||
setDescription("commands.admin.deaths.add.description");
|
||||
setParametersHelp("commands.admin.deaths.add.parameters");
|
||||
|
|
|
@ -12,6 +12,10 @@ public class AdminDeathsCommand extends CompositeCommand {
|
|||
|
||||
public AdminDeathsCommand(CompositeCommand parent) {
|
||||
super(parent, "deaths");
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setup() {
|
||||
setPermission("admin.deaths");
|
||||
setDescription("commands.admin.deaths.description");
|
||||
|
||||
|
|
|
@ -18,6 +18,10 @@ public class AdminDeathsRemoveCommand extends CompositeCommand {
|
|||
|
||||
public AdminDeathsRemoveCommand(AdminDeathsCommand parent) {
|
||||
super(parent, "remove");
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setup() {
|
||||
inheritPermission();
|
||||
setDescription("commands.admin.deaths.remove.description");
|
||||
setParametersHelp("commands.admin.deaths.remove.parameters");
|
||||
|
|
|
@ -16,6 +16,10 @@ public class AdminDeathsResetCommand extends CompositeCommand {
|
|||
|
||||
public AdminDeathsResetCommand(AdminDeathsCommand parent) {
|
||||
super(parent, "reset");
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setup() {
|
||||
inheritPermission();
|
||||
setDescription("commands.admin.deaths.reset.description");
|
||||
setParametersHelp("commands.admin.deaths.reset.parameters");
|
||||
|
|
|
@ -17,6 +17,10 @@ public class AdminDeathsSetCommand extends CompositeCommand {
|
|||
|
||||
public AdminDeathsSetCommand(AdminDeathsCommand parent) {
|
||||
super(parent, "set");
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setup() {
|
||||
inheritPermission();
|
||||
setDescription("commands.admin.deaths.set.description");
|
||||
setParametersHelp("commands.admin.deaths.set.parameters");
|
||||
|
|
|
@ -29,6 +29,10 @@ public class AdminPurgeCommand extends CompositeCommand implements Listener {
|
|||
public AdminPurgeCommand(CompositeCommand parent) {
|
||||
super(parent, "purge");
|
||||
getAddon().registerListener(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setup() {
|
||||
setPermission("admin.purge");
|
||||
setOnlyPlayer(false);
|
||||
setParametersHelp("commands.admin.purge.parameters");
|
||||
|
|
|
@ -12,6 +12,10 @@ public class AdminPurgeProtectCommand extends CompositeCommand {
|
|||
|
||||
public AdminPurgeProtectCommand(CompositeCommand parent) {
|
||||
super(parent, "protect");
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setup() {
|
||||
inheritPermission();
|
||||
setOnlyPlayer(true);
|
||||
setDescription("commands.admin.purge.protect.description");
|
||||
|
|
|
@ -15,6 +15,10 @@ public class AdminPurgeStatusCommand extends CompositeCommand {
|
|||
|
||||
public AdminPurgeStatusCommand(AdminPurgeCommand parent) {
|
||||
super(parent, "status");
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setup() {
|
||||
inheritPermission();
|
||||
setOnlyPlayer(false);
|
||||
setParametersHelp("commands.admin.purge.status.parameters");
|
||||
|
|
|
@ -9,6 +9,10 @@ public class AdminPurgeStopCommand extends CompositeCommand {
|
|||
|
||||
public AdminPurgeStopCommand(CompositeCommand parent) {
|
||||
super(parent, "stop", "cancel");
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setup() {
|
||||
inheritPermission();
|
||||
setOnlyPlayer(false);
|
||||
setDescription("commands.admin.purge.stop.description");
|
||||
|
|
|
@ -13,6 +13,10 @@ public class AdminPurgeUnownedCommand extends ConfirmableCommand {
|
|||
|
||||
public AdminPurgeUnownedCommand(AdminPurgeCommand parent) {
|
||||
super(parent, "unowned");
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setup() {
|
||||
inheritPermission();
|
||||
setOnlyPlayer(false);
|
||||
setParametersHelp("commands.admin.purge.unowned.parameters");
|
||||
|
|
|
@ -20,6 +20,10 @@ public class AdminRangeAddCommand extends CompositeCommand {
|
|||
|
||||
public AdminRangeAddCommand(AdminRangeCommand parent) {
|
||||
super(parent, "add");
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setup() {
|
||||
inheritPermission();
|
||||
setDescription("commands.admin.range.add.description");
|
||||
setParametersHelp("commands.admin.range.add.parameters");
|
||||
|
|
|
@ -12,6 +12,10 @@ public class AdminRangeCommand extends CompositeCommand {
|
|||
|
||||
public AdminRangeCommand(CompositeCommand parent) {
|
||||
super (parent, "range");
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setup() {
|
||||
setPermission("admin.range");
|
||||
setDescription("commands.admin.range.description");
|
||||
|
||||
|
|
|
@ -27,6 +27,10 @@ public class AdminRangeDisplayCommand extends CompositeCommand {
|
|||
|
||||
public AdminRangeDisplayCommand(CompositeCommand parent) {
|
||||
super(parent, DISPLAY, SHOW, HIDE);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setup() {
|
||||
setPermission("admin.range.display");
|
||||
setDescription("commands.admin.range.display.description");
|
||||
setOnlyPlayer(true);
|
||||
|
|
|
@ -20,6 +20,10 @@ public class AdminRangeRemoveCommand extends CompositeCommand {
|
|||
|
||||
public AdminRangeRemoveCommand(AdminRangeCommand parent) {
|
||||
super(parent, "remove");
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setup() {
|
||||
inheritPermission();
|
||||
setDescription("commands.admin.range.remove.description");
|
||||
setParametersHelp("commands.admin.range.remove.parameters");
|
||||
|
|
|
@ -16,6 +16,10 @@ public class AdminRangeResetCommand extends CompositeCommand {
|
|||
|
||||
public AdminRangeResetCommand(CompositeCommand parent) {
|
||||
super(parent, "reset");
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setup() {
|
||||
setPermission("admin.range.reset");
|
||||
setParametersHelp("commands.admin.range.reset.parameters");
|
||||
setDescription("commands.admin.range.reset.description");
|
||||
|
|
|
@ -16,6 +16,10 @@ public class AdminRangeSetCommand extends CompositeCommand {
|
|||
|
||||
public AdminRangeSetCommand(CompositeCommand parent) {
|
||||
super(parent, "set");
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setup() {
|
||||
setPermission("admin.range.set");
|
||||
setParametersHelp("commands.admin.range.set.parameters");
|
||||
setDescription("commands.admin.range.set.description");
|
||||
|
|
|
@ -18,6 +18,10 @@ public class AdminResetsAddCommand extends CompositeCommand {
|
|||
|
||||
public AdminResetsAddCommand(AdminResetsCommand parent) {
|
||||
super(parent, "add");
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setup() {
|
||||
inheritPermission();
|
||||
setDescription("commands.admin.resets.add.description");
|
||||
setParametersHelp("commands.admin.resets.add.parameters");
|
||||
|
|
|
@ -9,6 +9,10 @@ public class AdminResetsCommand extends CompositeCommand {
|
|||
|
||||
public AdminResetsCommand(CompositeCommand parent) {
|
||||
super(parent, "resets");
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setup() {
|
||||
setPermission("admin.resets");
|
||||
setDescription("commands.admin.resets.description");
|
||||
|
||||
|
|
|
@ -18,6 +18,10 @@ public class AdminResetsRemoveCommand extends CompositeCommand {
|
|||
|
||||
public AdminResetsRemoveCommand(AdminResetsCommand parent) {
|
||||
super(parent, "remove");
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setup() {
|
||||
inheritPermission();
|
||||
setDescription("commands.admin.resets.remove.description");
|
||||
setParametersHelp("commands.admin.resets.remove.parameters");
|
||||
|
|
|
@ -17,6 +17,10 @@ public class AdminResetsResetCommand extends ConfirmableCommand {
|
|||
|
||||
public AdminResetsResetCommand(CompositeCommand parent) {
|
||||
super(parent, "reset");
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setup() {
|
||||
inheritPermission();
|
||||
setDescription("commands.admin.resets.reset.description");
|
||||
setParametersHelp("commands.admin.resets.reset.parameters");
|
||||
|
|
|
@ -12,6 +12,10 @@ public class AdminResetsSetCommand extends CompositeCommand {
|
|||
|
||||
public AdminResetsSetCommand(CompositeCommand parent) {
|
||||
super(parent, "set");
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setup() {
|
||||
inheritPermission();
|
||||
setDescription("commands.admin.resets.set.description");
|
||||
setParametersHelp("commands.admin.resets.set.parameters");
|
||||
|
|
|
@ -16,6 +16,10 @@ public class AdminTeamAddCommand extends CompositeCommand {
|
|||
|
||||
public AdminTeamAddCommand(CompositeCommand parent) {
|
||||
super(parent, "add");
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setup() {
|
||||
setPermission("mod.team");
|
||||
setParametersHelp("commands.admin.team.add.parameters");
|
||||
setDescription("commands.admin.team.add.description");
|
||||
|
|
|
@ -15,6 +15,10 @@ public class AdminTeamDisbandCommand extends CompositeCommand {
|
|||
|
||||
public AdminTeamDisbandCommand(CompositeCommand parent) {
|
||||
super(parent, "disband");
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setup() {
|
||||
setPermission("mod.team");
|
||||
setParametersHelp("commands.admin.team.disband.parameters");
|
||||
setDescription("commands.admin.team.disband.description");
|
||||
|
|
|
@ -21,6 +21,10 @@ public class AdminTeamKickCommand extends CompositeCommand {
|
|||
|
||||
public AdminTeamKickCommand(CompositeCommand parent) {
|
||||
super(parent, "kick");
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setup() {
|
||||
setPermission("mod.team");
|
||||
setParametersHelp("commands.admin.team.kick.parameters");
|
||||
setDescription("commands.admin.team.kick.description");
|
||||
|
|
|
@ -19,6 +19,10 @@ public class AdminTeamSetownerCommand extends CompositeCommand {
|
|||
|
||||
public AdminTeamSetownerCommand(CompositeCommand parent) {
|
||||
super(parent, "setowner");
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setup() {
|
||||
setPermission("mod.team");
|
||||
setParametersHelp("commands.admin.team.setowner.parameters");
|
||||
setDescription("commands.admin.team.setowner.description");
|
||||
|
|
|
@ -16,6 +16,10 @@ public class CustomIslandMultiHomeHelp extends CompositeCommand {
|
|||
|
||||
public CustomIslandMultiHomeHelp(CompositeCommand parent) {
|
||||
super(parent, "help");
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setup() {
|
||||
setOnlyPlayer(true);
|
||||
// Inherit parameters from the respective parent class - in this case, only /island go and /island sethome
|
||||
setParametersHelp(parent.getParameters());
|
||||
|
|
|
@ -25,6 +25,10 @@ public class IslandBanCommand extends CompositeCommand {
|
|||
|
||||
public IslandBanCommand(CompositeCommand islandCommand) {
|
||||
super(islandCommand, "ban");
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setup() {
|
||||
setPermission("island.ban");
|
||||
setOnlyPlayer(true);
|
||||
setParametersHelp("commands.island.ban.parameters");
|
||||
|
|
|
@ -15,6 +15,10 @@ public class IslandBanlistCommand extends CompositeCommand {
|
|||
|
||||
public IslandBanlistCommand(CompositeCommand islandCommand) {
|
||||
super(islandCommand, "banlist", "banned", "bans");
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setup() {
|
||||
setPermission("island.ban");
|
||||
setOnlyPlayer(true);
|
||||
setDescription("commands.island.banlist.description");
|
||||
|
|
|
@ -26,6 +26,10 @@ public class IslandCreateCommand extends CompositeCommand {
|
|||
*/
|
||||
public IslandCreateCommand(CompositeCommand islandCommand) {
|
||||
super(islandCommand, "create", "new");
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setup() {
|
||||
setPermission("island.create");
|
||||
setOnlyPlayer(true);
|
||||
setParametersHelp("commands.island.create.parameters");
|
||||
|
|
|
@ -26,6 +26,10 @@ public class IslandExpelCommand extends CompositeCommand {
|
|||
|
||||
public IslandExpelCommand(CompositeCommand islandCommand) {
|
||||
super(islandCommand, "expel");
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setup() {
|
||||
setOnlyPlayer(true);
|
||||
setPermission("island.expel");
|
||||
setParametersHelp("commands.island.expel.parameters");
|
||||
|
|
|
@ -18,13 +18,13 @@ public class IslandGoCommand extends DelayedTeleportCommand {
|
|||
|
||||
public IslandGoCommand(CompositeCommand islandCommand) {
|
||||
super(islandCommand, "go", "home", "h");
|
||||
setPermission("island.home");
|
||||
setOnlyPlayer(true);
|
||||
setDescription("commands.island.go.description");
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setup() {
|
||||
setPermission("island.home");
|
||||
setOnlyPlayer(true);
|
||||
setDescription("commands.island.go.description");
|
||||
new CustomIslandMultiHomeHelp(this);
|
||||
}
|
||||
|
||||
|
|
|
@ -15,6 +15,10 @@ public class IslandInfoCommand extends CompositeCommand {
|
|||
|
||||
public IslandInfoCommand(CompositeCommand parent) {
|
||||
super(parent, "info", "who");
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setup() {
|
||||
setPermission("island.info");
|
||||
setOnlyPlayer(false);
|
||||
setParametersHelp("commands.island.info.parameters");
|
||||
|
|
|
@ -13,6 +13,10 @@ public class IslandLanguageCommand extends CompositeCommand {
|
|||
|
||||
public IslandLanguageCommand(CompositeCommand islandCommand) {
|
||||
super(islandCommand, "language", "lang");
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setup() {
|
||||
setPermission("island.language");
|
||||
setOnlyPlayer(true);
|
||||
setDescription("commands.island.language.description");
|
||||
|
|
|
@ -22,6 +22,10 @@ public class IslandNearCommand extends CompositeCommand {
|
|||
|
||||
public IslandNearCommand(CompositeCommand islandCommand) {
|
||||
super(islandCommand, "near");
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setup() {
|
||||
setPermission("island.near");
|
||||
setOnlyPlayer(true);
|
||||
setParametersHelp("commands.island.near.parameters");
|
||||
|
|
|
@ -39,6 +39,10 @@ public class IslandResetCommand extends ConfirmableCommand {
|
|||
public IslandResetCommand(CompositeCommand islandCommand, boolean noPaste) {
|
||||
super(islandCommand, "reset", "restart");
|
||||
this.noPaste = noPaste;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setup() {
|
||||
setPermission("island.reset");
|
||||
setOnlyPlayer(true);
|
||||
setParametersHelp("commands.island.reset.parameters");
|
||||
|
|
|
@ -14,6 +14,10 @@ public class IslandResetnameCommand extends CompositeCommand {
|
|||
|
||||
public IslandResetnameCommand(CompositeCommand islandCommand) {
|
||||
super(islandCommand, "resetname");
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setup() {
|
||||
setPermission("island.name");
|
||||
setOnlyPlayer(true);
|
||||
setDescription("commands.island.resetname.description");
|
||||
|
|
|
@ -11,13 +11,13 @@ public class IslandSethomeCommand extends ConfirmableCommand {
|
|||
|
||||
public IslandSethomeCommand(CompositeCommand islandCommand) {
|
||||
super(islandCommand, "sethome");
|
||||
setPermission("island.sethome");
|
||||
setOnlyPlayer(true);
|
||||
setDescription("commands.island.sethome.description");
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setup() {
|
||||
setPermission("island.sethome");
|
||||
setOnlyPlayer(true);
|
||||
setDescription("commands.island.sethome.description");
|
||||
new CustomIslandMultiHomeHelp(this);
|
||||
}
|
||||
|
||||
|
|
|
@ -17,6 +17,10 @@ public class IslandSetnameCommand extends CompositeCommand {
|
|||
|
||||
public IslandSetnameCommand(CompositeCommand islandCommand) {
|
||||
super(islandCommand, "setname");
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setup() {
|
||||
setPermission("island.name");
|
||||
setOnlyPlayer(true);
|
||||
setParametersHelp("commands.island.setname.parameters");
|
||||
|
|
|
@ -17,6 +17,10 @@ public class IslandSettingsCommand extends CompositeCommand {
|
|||
|
||||
public IslandSettingsCommand(CompositeCommand islandCommand) {
|
||||
super(islandCommand, "settings", "flags", "options");
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setup() {
|
||||
setPermission("island.settings");
|
||||
setOnlyPlayer(true);
|
||||
setDescription("commands.island.settings.description");
|
||||
|
|
|
@ -16,6 +16,10 @@ public class IslandSpawnCommand extends DelayedTeleportCommand {
|
|||
|
||||
public IslandSpawnCommand(CompositeCommand parent) {
|
||||
super(parent, "spawn");
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setup() {
|
||||
setPermission("island.spawn");
|
||||
setOnlyPlayer(true);
|
||||
setDescription("commands.island.spawn.description");
|
||||
|
|
|
@ -22,6 +22,10 @@ public class IslandUnbanCommand extends CompositeCommand {
|
|||
|
||||
public IslandUnbanCommand(CompositeCommand islandCommand) {
|
||||
super(islandCommand, "unban", "pardon");
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setup() {
|
||||
setPermission("island.ban");
|
||||
setOnlyPlayer(true);
|
||||
setParametersHelp("commands.island.unban.parameters");
|
||||
|
|
|
@ -34,6 +34,10 @@ public class IslandTeamCommand extends CompositeCommand {
|
|||
public IslandTeamCommand(CompositeCommand parent) {
|
||||
super(parent, "team");
|
||||
inviteMap = new HashMap<>();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setup() {
|
||||
setPermission("island.team");
|
||||
setOnlyPlayer(true);
|
||||
setDescription("commands.island.team.description");
|
||||
|
|
|
@ -27,6 +27,10 @@ public class IslandTeamCoopCommand extends CompositeCommand {
|
|||
public IslandTeamCoopCommand(IslandTeamCommand parentCommand) {
|
||||
super(parentCommand, "coop");
|
||||
this.itc = parentCommand;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setup() {
|
||||
setPermission("island.team.coop");
|
||||
setOnlyPlayer(true);
|
||||
setParametersHelp("commands.island.team.coop.parameters");
|
||||
|
|
|
@ -24,6 +24,10 @@ public class IslandTeamInviteAcceptCommand extends ConfirmableCommand {
|
|||
public IslandTeamInviteAcceptCommand(IslandTeamCommand islandTeamCommand) {
|
||||
super(islandTeamCommand, "accept");
|
||||
this.itc = islandTeamCommand;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setup() {
|
||||
setPermission("island.team.accept");
|
||||
setOnlyPlayer(true);
|
||||
setDescription("commands.island.team.invite.accept.description");
|
||||
|
|
|
@ -24,6 +24,10 @@ public class IslandTeamInviteCommand extends CompositeCommand {
|
|||
public IslandTeamInviteCommand(IslandTeamCommand parent) {
|
||||
super(parent, "invite");
|
||||
itc = parent;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setup() {
|
||||
setPermission("island.team.invite");
|
||||
setOnlyPlayer(true);
|
||||
setDescription("commands.island.team.invite.description");
|
||||
|
|
|
@ -15,6 +15,10 @@ public class IslandTeamInviteRejectCommand extends CompositeCommand {
|
|||
public IslandTeamInviteRejectCommand(IslandTeamCommand islandTeamCommand) {
|
||||
super(islandTeamCommand, "reject");
|
||||
this.itc = islandTeamCommand;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setup() {
|
||||
setPermission("island.team.reject");
|
||||
setOnlyPlayer(true);
|
||||
setDescription("commands.island.team.invite.reject.description");
|
||||
|
|
|
@ -19,6 +19,10 @@ public class IslandTeamKickCommand extends ConfirmableCommand {
|
|||
|
||||
public IslandTeamKickCommand(CompositeCommand islandTeamCommand) {
|
||||
super(islandTeamCommand, "kick");
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setup() {
|
||||
setPermission("island.team.kick");
|
||||
setOnlyPlayer(true);
|
||||
setParametersHelp("commands.island.team.kick.parameters");
|
||||
|
|
|
@ -18,6 +18,10 @@ public class IslandTeamLeaveCommand extends ConfirmableCommand {
|
|||
|
||||
public IslandTeamLeaveCommand(CompositeCommand islandTeamCommand) {
|
||||
super(islandTeamCommand, "leave");
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setup() {
|
||||
setPermission("island.team.leave");
|
||||
setOnlyPlayer(true);
|
||||
setDescription("commands.island.team.leave.description");
|
||||
|
|
|
@ -13,6 +13,10 @@ public class IslandTeamPromoteCommand extends CompositeCommand {
|
|||
|
||||
public IslandTeamPromoteCommand(CompositeCommand islandTeamCommand, String string) {
|
||||
super(islandTeamCommand, string);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setup() {
|
||||
setPermission("island.team.promote");
|
||||
setOnlyPlayer(true);
|
||||
if (this.getLabel().equals("promote")) {
|
||||
|
|
|
@ -20,6 +20,10 @@ public class IslandTeamSetownerCommand extends CompositeCommand {
|
|||
|
||||
public IslandTeamSetownerCommand(CompositeCommand islandTeamCommand) {
|
||||
super(islandTeamCommand, "setowner");
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setup() {
|
||||
setPermission("island.team.setowner");
|
||||
setOnlyPlayer(true);
|
||||
setParametersHelp("commands.island.team.setowner.parameters");
|
||||
|
|
|
@ -27,6 +27,10 @@ public class IslandTeamTrustCommand extends CompositeCommand {
|
|||
public IslandTeamTrustCommand(IslandTeamCommand parentCommand) {
|
||||
super(parentCommand, "trust");
|
||||
this.itc = parentCommand;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setup() {
|
||||
setPermission("island.team.trust");
|
||||
setOnlyPlayer(true);
|
||||
setParametersHelp("commands.island.team.trust.parameters");
|
||||
|
|
|
@ -25,6 +25,10 @@ public class IslandTeamUncoopCommand extends CompositeCommand {
|
|||
|
||||
public IslandTeamUncoopCommand(CompositeCommand parentCommand) {
|
||||
super(parentCommand, "uncoop");
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setup() {
|
||||
setPermission("island.team.coop");
|
||||
setOnlyPlayer(true);
|
||||
setParametersHelp("commands.island.team.uncoop.parameters");
|
||||
|
|
|
@ -25,6 +25,10 @@ public class IslandTeamUntrustCommand extends CompositeCommand {
|
|||
|
||||
public IslandTeamUntrustCommand(CompositeCommand parentCommand) {
|
||||
super(parentCommand, "untrust");
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setup() {
|
||||
setPermission("island.team.trust");
|
||||
setOnlyPlayer(true);
|
||||
setParametersHelp("commands.island.team.untrust.parameters");
|
||||
|
|
|
@ -18,6 +18,10 @@ public class BentoBoxAboutCommand extends CompositeCommand {
|
|||
*/
|
||||
public BentoBoxAboutCommand(CompositeCommand parent) {
|
||||
super(parent, "about");
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setup() {
|
||||
setPermission("bentobox.about");
|
||||
}
|
||||
|
||||
|
|
|
@ -16,6 +16,10 @@ public class BentoBoxCatalogCommand extends CompositeCommand {
|
|||
|
||||
public BentoBoxCatalogCommand(CompositeCommand parent) {
|
||||
super(parent, "catalog");
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setup() {
|
||||
setPermission("bentobox.admin.catalog");
|
||||
setOnlyPlayer(true);
|
||||
}
|
||||
|
|
|
@ -12,6 +12,10 @@ public class BentoBoxCommand extends CompositeCommand {
|
|||
*/
|
||||
public BentoBoxCommand() {
|
||||
super("bentobox", "bbox");
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setup() {
|
||||
setPermission("bentobox.admin");
|
||||
new BentoBoxVersionCommand(this);
|
||||
new BentoBoxAboutCommand(this);
|
||||
|
|
|
@ -20,6 +20,10 @@ public class BentoBoxLocaleCommand extends ConfirmableCommand {
|
|||
*/
|
||||
public BentoBoxLocaleCommand(CompositeCommand parent) {
|
||||
super(parent, "locale");
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setup() {
|
||||
setPermission("bentobox.admin.locale");
|
||||
setDescription("commands.bentobox.locale.description");
|
||||
}
|
||||
|
|
|
@ -16,6 +16,10 @@ public class BentoBoxManageCommand extends CompositeCommand {
|
|||
|
||||
public BentoBoxManageCommand(CompositeCommand parent) {
|
||||
super(parent, "manage", "overview");
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setup() {
|
||||
setPermission("bentobox.admin.manage");
|
||||
setOnlyPlayer(true);
|
||||
}
|
||||
|
|
|
@ -26,6 +26,10 @@ public class BentoBoxMigrateCommand extends ConfirmableCommand {
|
|||
*/
|
||||
public BentoBoxMigrateCommand(CompositeCommand parent) {
|
||||
super(parent, "migrate");
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setup() {
|
||||
setPermission("bentobox.admin.migrate");
|
||||
setDescription("commands.bentobox.migrate.description");
|
||||
}
|
||||
|
|
|
@ -25,6 +25,10 @@ public class BentoBoxReloadCommand extends ConfirmableCommand {
|
|||
*/
|
||||
public BentoBoxReloadCommand(CompositeCommand parent) {
|
||||
super(parent, "reload", "rl");
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setup() {
|
||||
setPermission("bentobox.admin.reload");
|
||||
setParametersHelp("commands.bentobox.reload.parameters");
|
||||
setDescription("commands.bentobox.reload.description");
|
||||
|
|
|
@ -26,6 +26,10 @@ public class BentoBoxVersionCommand extends CompositeCommand {
|
|||
*/
|
||||
public BentoBoxVersionCommand(CompositeCommand parent) {
|
||||
super(parent, "version", "v", "ver", "versions", "addons");
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setup() {
|
||||
setPermission("bentobox.version");
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue