TntMode #163
@ -81,8 +81,8 @@ public class BauSystem extends JavaPlugin implements Listener {
|
||||
getCommand("nightvision").setExecutor(new CommandNV());
|
||||
getCommand("reset").setExecutor(new CommandReset());
|
||||
getCommand("speed").setExecutor(new CommandSpeed());
|
||||
getCommand("tnt").setExecutor(new CommandTNT());
|
||||
getCommand("buildmode").setExecutor(new CommandBuildMode());
|
||||
getCommand("tnt").setExecutor(new CommandTNT());
|
||||
getCommand("fire").setExecutor(new CommandFire());
|
||||
getCommand("freeze").setExecutor(new CommandFreeze());
|
||||
getCommand("testblock").setExecutor(new CommandTestblock());
|
||||
|
@ -55,18 +55,6 @@ public class CommandBuildMode extends ToggleCommand {
|
||||
return "§cBuild mode deaktiviert";
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean onCommand(CommandSender sender, Command command, String label, String[] args) {
|
||||
if(!(sender instanceof Player))
|
||||
return false;
|
||||
Player player = (Player) sender;
|
||||
if (!CommandTNT.getInstance().isOn()) {
|
||||
player.sendMessage(BauSystem.PREFIX + "§cUm den Build mode zu nutzen muss TNT an sein.");
|
||||
return false;
|
||||
}
|
||||
return super.onCommand(sender, command, label, args);
|
||||
}
|
||||
|
||||
@EventHandler
|
||||
public void onEntityExplode(EntityExplodeEvent event) {
|
||||
boolean blocksDestroyed = event.blockList().removeIf(block -> {
|
||||
|
@ -45,14 +45,6 @@ public class CommandTNT extends ToggleCommand {
|
||||
return "§aTNT-Schaden aktiviert";
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public void toggle() {
|
||||
if (CommandBuildMode.getInstance().isOn()) {
|
||||
CommandBuildMode.getInstance().toggle();
|
||||
}
|
||||
super.toggle();
|
||||
}
|
||||
|
||||
@EventHandler
|
||||
public void onExplode(EntityExplodeEvent e) {
|
||||
e.blockList().clear();
|
||||
|
@ -108,7 +108,7 @@ public class BauScoreboard implements Listener {
|
||||
private String tntString() {
|
||||
Lixfel
hat
Würde das ganze im TNTCommand eher über ein Switch/case mit Enum lösen. Würde das ganze im TNTCommand eher über ein Switch/case mit Enum lösen.
|
||||
if (!CommandTNT.getInstance().isOn()) {
|
||||
if (CommandBuildMode.getInstance().isOn()) {
|
||||
return "§eTestblock";
|
||||
return "§7nur §eTestblock";
|
||||
}
|
||||
return "§aan";
|
||||
}
|
||||
|
@ -109,8 +109,7 @@ public class Region {
|
||||
}
|
||||
|
||||
public static class Prototype{
|
||||
// private static final String SECTION_PATH = "/home/minecraft/backbone/server/UserBau/";
|
||||
private static final String SECTION_PATH = "/home/yoyonow/Dev1.15//UserBau/f75632be-e3ec-4069-9bec-d13ac6891177/";
|
||||
private static final String SECTION_PATH = "/home/minecraft/backbone/server/UserBau/";
|
||||
private static final Map<String, Prototype> prototypes = new HashMap<>();
|
||||
|
||||
private final int sizeX;
|
||||
|
In neuem Issue referenzieren
Einen Benutzer sperren
Nur Testblock ist ja so nicht ganz richtig. Ist ja eher ein Nicht Baubereich (klingt aber beschissen). Evtl. fällt uns da noch was besseres ein.
Wie würdest du das dann nennen?