mirror of
https://github.com/BentoBoxWorld/BSkyBlock.git
synced 2025-01-29 22:21:28 +01:00
Adds Admin switch command for bypassing protections.
This commit is contained in:
parent
c1d0071248
commit
fc76f9c27a
@ -12,6 +12,7 @@ import world.bentobox.bentobox.api.commands.admin.AdminReloadCommand;
|
||||
import world.bentobox.bentobox.api.commands.admin.AdminResetFlagsCommand;
|
||||
import world.bentobox.bentobox.api.commands.admin.AdminSetrankCommand;
|
||||
import world.bentobox.bentobox.api.commands.admin.AdminSetspawnCommand;
|
||||
import world.bentobox.bentobox.api.commands.admin.AdminSwitchCommand;
|
||||
import world.bentobox.bentobox.api.commands.admin.AdminSwitchtoCommand;
|
||||
import world.bentobox.bentobox.api.commands.admin.AdminTeleportCommand;
|
||||
import world.bentobox.bentobox.api.commands.admin.AdminTrashCommand;
|
||||
@ -81,6 +82,8 @@ public class AdminCommand extends CompositeCommand {
|
||||
new AdminTrashCommand(this);
|
||||
new AdminEmptyTrashCommand(this);
|
||||
new AdminSwitchtoCommand(this);
|
||||
// Switch
|
||||
new AdminSwitchCommand(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -80,6 +80,9 @@ permissions:
|
||||
bskyblock.mod.bypassexpel:
|
||||
description: Allow moderator to bypass island expulsion
|
||||
default: op
|
||||
bskyblock.mod.switch:
|
||||
description: Allows moderator to switch bypass protection on and off
|
||||
default: op
|
||||
bskyblock.mod.lock:
|
||||
description: Locks or unlocks an island
|
||||
default: op
|
||||
|
@ -38,6 +38,7 @@ import world.bentobox.bskyblock.Settings;
|
||||
@PrepareForTest({Bukkit.class, BentoBox.class, User.class })
|
||||
public class AdminCommandTest {
|
||||
|
||||
private static final int NUM_COMMANDS = 27;
|
||||
private User user;
|
||||
private BSkyBlock addon;
|
||||
|
||||
@ -96,7 +97,7 @@ public class AdminCommandTest {
|
||||
assertEquals("commands.admin.help.parameters", cmd.getParameters());
|
||||
assertEquals("commands.admin.help.description", cmd.getDescription());
|
||||
// Number of commands = sub commands + help
|
||||
assertEquals("Number of sub commands registered", 26, cmd.getSubCommands().values().size());
|
||||
assertEquals("Number of sub commands registered", NUM_COMMANDS, cmd.getSubCommands().values().size());
|
||||
}
|
||||
|
||||
/**
|
||||
|
Loading…
Reference in New Issue
Block a user