Add CommandBuildMode
Dieser Commit ist enthalten in:
Ursprung
a22e1d37b9
Commit
0be031f5fe
@ -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() {
|
||||
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