diff --git a/BauSystem_Main/src/de/steamwar/bausystem/features/script/ScriptCommand.java b/BauSystem_Main/src/de/steamwar/bausystem/features/script/ScriptCommand.java index 7382e4c5..6bb50488 100644 --- a/BauSystem_Main/src/de/steamwar/bausystem/features/script/ScriptCommand.java +++ b/BauSystem_Main/src/de/steamwar/bausystem/features/script/ScriptCommand.java @@ -62,7 +62,28 @@ public class ScriptCommand extends SWCommand { swItems.add(new SWListInv.SWListEntry<>(swItem, null)); }); swItems.add(new SWListInv.SWListEntry<>(new SWItem(Material.BOOK, "§eCustom Commands", Arrays.asList("§7Schreibe§8: §7#!CMD 'COMMAND'", "§7an den Anfang eines Script Buches um", "§7ein Custom Command zu nutzen. Der", "§7Befehl startet immer mit / und kann dann so", "§7aufgebaut sein wie du willst. Alles was in Spitzen", "§7Klammern steht (<>) wird als Parameter und somit", "§7als Variable gewertet."), false, clickType -> { - + }), null)); + swItems.add(new SWListInv.SWListEntry<>(new SWItem(Material.TNT_MINECART, "§7Constant §etrace", Arrays.asList("§7true wenn gerade der Tracer an ist."), false, clickType -> { + }), null)); + swItems.add(new SWListInv.SWListEntry<>(new SWItem(Material.TNT_MINECART, "§7Constant §eautotrace", Arrays.asList("§7true wenn gerade der AutoTracer an ist."), false, clickType -> { + }), null)); + swItems.add(new SWListInv.SWListEntry<>(new SWItem(Material.TNT, "§7Constant §etnt", Arrays.asList("§7true wenn TNT nicht ausgeschaltet ist."), false, clickType -> { + }), null)); + swItems.add(new SWListInv.SWListEntry<>(new SWItem(Material.GUNPOWDER, "§7Constant §efreeze", Arrays.asList("§7true wenn Freeze nicht ausgeschaltet ist."), false, clickType -> { + }), null)); + swItems.add(new SWListInv.SWListEntry<>(new SWItem(Material.FIRE_CHARGE, "§7Constant §efire", Arrays.asList("§7true wenn Fire nicht ausgeschaltet ist."), false, clickType -> { + }), null)); + swItems.add(new SWListInv.SWListEntry<>(new SWItem(Material.OBSIDIAN, "§7Constant §eprotect", Arrays.asList("§7true wenn Protect angeschaltet ist."), false, clickType -> { + }), null)); + swItems.add(new SWListInv.SWListEntry<>(new SWItem(Material.PLAYER_HEAD, "§7Constant §ex", Arrays.asList("§7x Position des Spielers."), false, clickType -> { + }), null)); + swItems.add(new SWListInv.SWListEntry<>(new SWItem(Material.PLAYER_HEAD, "§7Constant §ey", Arrays.asList("§7y Position des Spielers."), false, clickType -> { + }), null)); + swItems.add(new SWListInv.SWListEntry<>(new SWItem(Material.PLAYER_HEAD, "§7Constant §ez", Arrays.asList("§7z Position des Spielers."), false, clickType -> { + }), null)); + swItems.add(new SWListInv.SWListEntry<>(new SWItem(Material.TNT, "§7Constant §ename", Arrays.asList("§7Display Name des Spielers."), false, clickType -> { + }), null)); + swItems.add(new SWListInv.SWListEntry<>(new SWItem(Material.TNT, "§7Constant §esneak", Arrays.asList("§7true wenn der Spieler gerade sneakt."), false, clickType -> { }), null)); } diff --git a/BauSystem_Main/src/de/steamwar/bausystem/features/script/variables/Constants.java b/BauSystem_Main/src/de/steamwar/bausystem/features/script/variables/Constants.java index ae7740bc..7e5508ff 100644 --- a/BauSystem_Main/src/de/steamwar/bausystem/features/script/variables/Constants.java +++ b/BauSystem_Main/src/de/steamwar/bausystem/features/script/variables/Constants.java @@ -5,6 +5,7 @@ import de.steamwar.bausystem.region.Region; import de.steamwar.bausystem.region.flags.Flag; import de.steamwar.bausystem.region.flags.flagvalues.FireMode; import de.steamwar.bausystem.region.flags.flagvalues.FreezeMode; +import de.steamwar.bausystem.region.flags.flagvalues.ProtectMode; import de.steamwar.bausystem.region.flags.flagvalues.TNTMode; import lombok.experimental.UtilityClass; import org.bukkit.entity.Player; @@ -35,6 +36,9 @@ public class Constants { CONSTANTS.put("fire", player -> { return new Value.BooleanValue(Region.getRegion(player.getLocation()).getPlain(Flag.FIRE, FireMode.class) == FireMode.ALLOW); }); + CONSTANTS.put("protect", player -> { + return new Value.BooleanValue(Region.getRegion(player.getLocation()).getPlain(Flag.PROTECT, ProtectMode.class) == ProtectMode.ACTIVE); + }); CONSTANTS.put("x", player -> { return new Value.LongValue(player.getLocation().getBlockX()); });