Add protect Constant
Add ScriptCommand constant value helps Signed-off-by: yoyosource <yoyosource@nidido.de>
Dieser Commit ist enthalten in:
Ursprung
6e0c5a0fc3
Commit
847cad24e9
@ -62,7 +62,28 @@ public class ScriptCommand extends SWCommand {
|
|||||||
swItems.add(new SWListInv.SWListEntry<>(swItem, null));
|
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 -> {
|
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));
|
}), null));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -5,6 +5,7 @@ import de.steamwar.bausystem.region.Region;
|
|||||||
import de.steamwar.bausystem.region.flags.Flag;
|
import de.steamwar.bausystem.region.flags.Flag;
|
||||||
import de.steamwar.bausystem.region.flags.flagvalues.FireMode;
|
import de.steamwar.bausystem.region.flags.flagvalues.FireMode;
|
||||||
import de.steamwar.bausystem.region.flags.flagvalues.FreezeMode;
|
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 de.steamwar.bausystem.region.flags.flagvalues.TNTMode;
|
||||||
import lombok.experimental.UtilityClass;
|
import lombok.experimental.UtilityClass;
|
||||||
import org.bukkit.entity.Player;
|
import org.bukkit.entity.Player;
|
||||||
@ -35,6 +36,9 @@ public class Constants {
|
|||||||
CONSTANTS.put("fire", player -> {
|
CONSTANTS.put("fire", player -> {
|
||||||
return new Value.BooleanValue(Region.getRegion(player.getLocation()).getPlain(Flag.FIRE, FireMode.class) == FireMode.ALLOW);
|
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 -> {
|
CONSTANTS.put("x", player -> {
|
||||||
return new Value.LongValue(player.getLocation().getBlockX());
|
return new Value.LongValue(player.getLocation().getBlockX());
|
||||||
});
|
});
|
||||||
|
In neuem Issue referenzieren
Einen Benutzer sperren