remove bsd

This commit is contained in:
okx-code
2026-04-14 17:19:22 +01:00
parent 525827795a
commit de55bb4164
5 changed files with 2 additions and 20 deletions

View File

@@ -124,7 +124,6 @@ public final class Bastion extends ACivMod {
context -> new ArrayList<>(BastionType.getTypeNames()));
commandManager.registerCommand(new BastionCommandManager());
getCommand("bsi").setExecutor(new ModeChangeCommand(Mode.INFO));
getCommand("bsd").setExecutor(new ModeChangeCommand(Mode.DELETE));
getCommand("bso").setExecutor(new ModeChangeCommand(Mode.NORMAL));
getCommand("bsb").setExecutor(new ModeChangeCommand(Mode.BASTION));
getCommand("bsf").setExecutor(new ModeChangeCommand(Mode.OFF));

View File

@@ -10,7 +10,7 @@ import org.bukkit.entity.Player;
public class PlayersStates {
static public enum Mode {
NORMAL, INFO, DELETE, OFF, BASTION, MATURE
NORMAL, INFO, OFF, BASTION, MATURE
}
static private Map<UUID, Mode> playersModes = new HashMap<>();

View File

@@ -85,19 +85,6 @@ public class BastionInteractListener implements Listener {
TextComponent toSend = blockManager.infoMessageComponent(dev, block.getRelative(event.getBlockFace()), block, player);
player.spigot().sendMessage(toSend);
} else if (PlayersStates.playerInMode(player, Mode.DELETE)) {
BastionBlock bastionBlock = blockStorage.getBastionBlock(block.getLocation());
if (bastionBlock == null) {
return;
}
if (bastionBlock.canRemove(player)) {
TextComponent toSend = blockManager.bastionDeletedMessageComponent(bastionBlock);
bastionBlock.destroy();
player.spigot().sendMessage(toSend);
event.setCancelled(true);
}
} else if (PlayersStates.playerInMode(player, Mode.MATURE)) {
BastionBlock bastionBlock = blockStorage.getBastionBlock(block.getLocation());

View File

@@ -11,10 +11,6 @@ commands:
description: Gives info on blocks that are clicked
usage: /bsi and right click a block
permission: Bastion.normal
bsd:
description: Removes Bastion Block when clicked
usage: /bsd and right click a block
permission: Bastion.normal
bso:
description: Returns to normal
usage: /bso set the mode back to normal