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