Add CommandTNT by Region.buildAreaEnabled()
Dieser Commit ist enthalten in:
Ursprung
76359c9c38
Commit
f887e633ad
@ -34,7 +34,7 @@ public class CommandInfo implements CommandExecutor {
|
||||
@Override
|
||||
public boolean onCommand(CommandSender sender, Command command, String label, String[] args) {
|
||||
sender.sendMessage(BauSystem.PREFIX + "Besitzer: §e" + SteamwarUser.get(BauSystem.getOwnerID()).getUserName());
|
||||
sender.sendMessage(BauSystem.PREFIX + "TNT-Schaden: " + (CommandTNT.getTntMode() == CommandTNT.TNTMode.OFF ? "§cAN" : "§aAUS"));
|
||||
sender.sendMessage(BauSystem.PREFIX + "TNT-Schaden: " + CommandTNT.getTntMode().getName());
|
||||
sender.sendMessage(BauSystem.PREFIX + "Feuerschaden: " + (CommandFire.getInstance().isOn() ? "§aAUS" : "§cAN"));
|
||||
sender.sendMessage(BauSystem.PREFIX + "Eingefroren: " + (CommandFreeze.getInstance().isOn() ? "§aJA" : "§cNEIN"));
|
||||
|
||||
|
@ -93,20 +93,27 @@ public class CommandTNT implements CommandExecutor, Listener {
|
||||
return false;
|
||||
}
|
||||
|
||||
if (args.length != 0 && (args[0].equalsIgnoreCase("an") || args[0].equalsIgnoreCase("on"))) {
|
||||
tntMode = TNTMode.ON;
|
||||
sendToActionBar(getEnableMessage());
|
||||
return false;
|
||||
}
|
||||
if (args.length != 0 && (args[0].equalsIgnoreCase("aus") || args[0].equalsIgnoreCase("off"))) {
|
||||
tntMode = TNTMode.OFF;
|
||||
sendToActionBar(getDisableMessage());
|
||||
return false;
|
||||
}
|
||||
if (args.length != 0 && Region.buildAreaEnabled() && (args[0].equalsIgnoreCase("testblock") || args[0].equalsIgnoreCase("tb"))) {
|
||||
tntMode = TNTMode.ONLY_TB;
|
||||
sendToActionBar(getTestblockEnableMessage());
|
||||
return false;
|
||||
if (args.length != 0) {
|
||||
switch (args[0].toLowerCase()) {
|
||||
case "an":
|
||||
case "on":
|
||||
tntMode = TNTMode.ON;
|
||||
sendToActionBar(getEnableMessage());
|
||||
return false;
|
||||
case "aus":
|
||||
case "off":
|
||||
tntMode = TNTMode.OFF;
|
||||
sendToActionBar(getDisableMessage());
|
||||
return false;
|
||||
case "testblock":
|
||||
case "tb":
|
||||
if (!Region.buildAreaEnabled()) break;
|
||||
tntMode = TNTMode.ONLY_TB;
|
||||
sendToActionBar(getTestblockEnableMessage());
|
||||
return false;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
switch (tntMode) {
|
||||
|
In neuem Issue referenzieren
Einen Benutzer sperren