Fix Build issues
Dieser Commit ist enthalten in:
Ursprung
ae6d5ee671
Commit
f04bf70087
@ -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.getInstance().isOn() ? "§aAUS" : "§cAN"));
|
sender.sendMessage(BauSystem.PREFIX + "TNT-Schaden: " + (CommandTNT.getTntMode() == CommandTNT.TNTMode.OFF ? "§cAN" : "§aAUS"));
|
||||||
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"));
|
||||||
|
|
||||||
|
@ -68,11 +68,11 @@ public class CommandTNT implements CommandExecutor, Listener {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private String getEnableMessage() {
|
private String getEnableMessage() {
|
||||||
return "§cTNT-Schaden deaktiviert";
|
return "§aTNT-Schaden aktiviert";
|
||||||
}
|
}
|
||||||
|
|
||||||
private String getDisableMessage() {
|
private String getDisableMessage() {
|
||||||
return "§aTNT-Schaden aktiviert";
|
return "§cTNT-Schaden deaktiviert";
|
||||||
}
|
}
|
||||||
|
|
||||||
private String getTestblockEnableMessage() {
|
private String getTestblockEnableMessage() {
|
||||||
@ -93,11 +93,21 @@ public class CommandTNT implements CommandExecutor, Listener {
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (args.length != 0 && args[0].equalsIgnoreCase("on")) {
|
if (args.length != 0 && (args[0].equalsIgnoreCase("an") || args[0].equalsIgnoreCase("on"))) {
|
||||||
tntMode = TNTMode.ON;
|
tntMode = TNTMode.ON;
|
||||||
sendToActionBar(getEnableMessage());
|
sendToActionBar(getEnableMessage());
|
||||||
return false;
|
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 && (args[0].equalsIgnoreCase("testblock") || args[0].equalsIgnoreCase("tb"))) {
|
||||||
|
tntMode = TNTMode.ONLY_TB;
|
||||||
|
sendToActionBar(getTestblockEnableMessage());
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
switch (tntMode) {
|
switch (tntMode) {
|
||||||
case ON:
|
case ON:
|
||||||
|
@ -34,12 +34,17 @@ public class CommandTNTTabComplete implements TabCompleter {
|
|||||||
@Override
|
@Override
|
||||||
public List<String> onTabComplete(CommandSender sender, Command command, String label, String[] args) {
|
public List<String> onTabComplete(CommandSender sender, Command command, String label, String[] args) {
|
||||||
if(!(sender instanceof Player)) return new ArrayList<>();
|
if(!(sender instanceof Player)) return new ArrayList<>();
|
||||||
return detonaterTabComplete((Player) sender, args);
|
return tntTabComplete((Player) sender, args);
|
||||||
}
|
}
|
||||||
|
|
||||||
private List<String> detonaterTabComplete(Player player, String[] args) {
|
private List<String> tntTabComplete(Player player, String[] args) {
|
||||||
List<String> tabComplete = new ArrayList<>();
|
List<String> tabComplete = new ArrayList<>();
|
||||||
tabComplete.add("an");
|
tabComplete.add("an");
|
||||||
|
tabComplete.add("on");
|
||||||
|
tabComplete.add("aus");
|
||||||
|
tabComplete.add("off");
|
||||||
|
tabComplete.add("testblock");
|
||||||
|
tabComplete.add("tb");
|
||||||
|
|
||||||
if (args.length >= 2) {
|
if (args.length >= 2) {
|
||||||
return new ArrayList<>();
|
return new ArrayList<>();
|
||||||
|
@ -284,7 +284,7 @@ public class ScriptListener implements Listener {
|
|||||||
case "trace":
|
case "trace":
|
||||||
return RecordStateMachine.getRecordStatus().isTracing() ? 1 : 0;
|
return RecordStateMachine.getRecordStatus().isTracing() ? 1 : 0;
|
||||||
case "tnt":
|
case "tnt":
|
||||||
return CommandTNT.getInstance().isOn() ? 1 : 0;
|
return CommandTNT.getTntMode() == CommandTNT.TNTMode.OFF ? 0 : 1;
|
||||||
case "freeze":
|
case "freeze":
|
||||||
return CommandFreeze.getInstance().isOn() ? 1 : 0;
|
return CommandFreeze.getInstance().isOn() ? 1 : 0;
|
||||||
case "fire":
|
case "fire":
|
||||||
|
In neuem Issue referenzieren
Einen Benutzer sperren