mirror of
https://github.com/CivMC/Civ.git
synced 2026-07-15 23:20:44 +00:00
remove bsd
This commit is contained in:
Submodule PrivateConfig updated: e87f3346c8...2941940e8d
@@ -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));
|
||||
|
||||
@@ -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<>();
|
||||
|
||||
@@ -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());
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user