Add Inventory notice and fix region.get
Alle Prüfungen waren erfolgreich
SteamWarCI Build successful
Alle Prüfungen waren erfolgreich
SteamWarCI Build successful
Signed-off-by: Chaoscaot <chaoscaot@zohomail.eu>
Dieser Commit ist enthalten in:
Ursprung
531fb013aa
Commit
bdd437eebd
@ -250,6 +250,7 @@ SCRIPT_MENU_GUI_ITEM_ADD_NAME = §eInsert
|
||||
SCRIPT_MENU_GUI_ITEM_ADD_LORE = §7Click with a book to insert
|
||||
|
||||
SCRIPT_MENU_GUI_ENTER_NAME = §eEnter a name
|
||||
SCRIPT_DEPRECATED=§cThe function §8'§e{0}§8'§c is depricated and will be removed in the future. Please use §8'§e{1}§8'§c instead.
|
||||
|
||||
# Shield Printing
|
||||
SHIELD_PRINTING_HELP_START = §8/§eshieldprinting start §8- §7Starts the shield printing
|
||||
|
@ -240,6 +240,7 @@ SCRIPT_MENU_GUI_ITEM_LORE_4 = §7Mittelklick zum anschauen
|
||||
SCRIPT_MENU_GUI_NAME = §eSkript-Menü
|
||||
SCRIPT_MENU_GUI_ITEM_ADD_NAME = §eHinzufügen
|
||||
SCRIPT_MENU_GUI_ITEM_ADD_LORE = §7Klicke mit einem Buch zum hinzufügen
|
||||
SCRIPT_DEPRECATED=§cDie Funktion §e{0}§c ist veraltet und wird demnächst entfernt. Bitte benutze §e{1}§c.
|
||||
|
||||
# Shield Printing
|
||||
SHIELD_PRINTING_HELP_START = §8/§eshieldprinting start §8- §7Starte das Schild drucken
|
||||
|
@ -59,6 +59,7 @@ public class InventoryLib implements LuaLib {
|
||||
table.set("setItem", new VarArgFunction() {
|
||||
@Override
|
||||
public Varargs invoke(Varargs args) {
|
||||
BauSystem.MESSAGE.send("SCRIPT_DEPRECATED", player, "inventory.setItem", "inventory.item");
|
||||
int slot = args.checkint(1);
|
||||
Material material = SWItem.getMaterial(args.checkjstring(2));
|
||||
String name = ChatColor.translateAlternateColorCodes('&', args.checkjstring(3));
|
||||
|
@ -47,25 +47,25 @@ public class RegionLib implements LuaLib {
|
||||
private LuaTable create(Region region, Player player) {
|
||||
LuaTable table = LuaValue.tableOf();
|
||||
|
||||
table.set("name", getter(() -> Region.getRegion(player.getLocation()).getName()));
|
||||
table.set("type", getter(() -> Region.getRegion(player.getLocation()).getPrototype().getName()));
|
||||
table.set("name", getter(() -> region.getName()));
|
||||
table.set("type", getter(() -> region.getPrototype().getName()));
|
||||
|
||||
LuaValue tntLib = LuaValue.tableOf();
|
||||
tntLib.set("mode", getter(() -> Region.getRegion(player.getLocation()).getPlain(Flag.TNT, TNTMode.class).name()));
|
||||
tntLib.set("enabled", getter(() -> Region.getRegion(player.getLocation()).getPlain(Flag.TNT, TNTMode.class) != TNTMode.DENY));
|
||||
tntLib.set("onlyTb", getter(() -> Region.getRegion(player.getLocation()).getPlain(Flag.TNT, TNTMode.class) == TNTMode.ONLY_TB));
|
||||
tntLib.set("mode", getter(() -> region.getPlain(Flag.TNT, TNTMode.class).name()));
|
||||
tntLib.set("enabled", getter(() -> region.getPlain(Flag.TNT, TNTMode.class) != TNTMode.DENY));
|
||||
tntLib.set("onlyTb", getter(() -> region.getPlain(Flag.TNT, TNTMode.class) == TNTMode.ONLY_TB));
|
||||
|
||||
table.set("tnt", tntLib);
|
||||
|
||||
table.set("fire", getter(() -> Region.getRegion(player.getLocation()).getPlain(Flag.FIRE, FireMode.class) == FireMode.ALLOW));
|
||||
table.set("freeze", getter(() -> Region.getRegion(player.getLocation()).getPlain(Flag.FREEZE, FreezeMode.class) == FreezeMode.ACTIVE));
|
||||
table.set("protect", getter(() -> Region.getRegion(player.getLocation()).getPlain(Flag.PROTECT, ProtectMode.class) == ProtectMode.ACTIVE));
|
||||
table.set("fire", getter(() -> region.getPlain(Flag.FIRE, FireMode.class) == FireMode.ALLOW));
|
||||
table.set("freeze", getter(() -> region.getPlain(Flag.FREEZE, FreezeMode.class) == FreezeMode.ACTIVE));
|
||||
table.set("protect", getter(() -> region.getPlain(Flag.PROTECT, ProtectMode.class) == ProtectMode.ACTIVE));
|
||||
|
||||
LuaValue traceLib = LuaValue.tableOf();
|
||||
traceLib.set("active", getter(() -> !Region.getRegion(player.getLocation()).isGlobal() && Recorder.INSTANCE.get(Region.getRegion(player.getLocation())) instanceof ActiveTracer));
|
||||
traceLib.set("auto", getter(() -> !Region.getRegion(player.getLocation()).isGlobal() && Recorder.INSTANCE.get(Region.getRegion(player.getLocation())) instanceof AutoTraceRecorder));
|
||||
traceLib.set("status", getter(() -> Recorder.INSTANCE.get(Region.getRegion(player.getLocation())).scriptState()));
|
||||
traceLib.set("time", getter(() -> Recorder.INSTANCE.get(Region.getRegion(player.getLocation())).scriptTime()));
|
||||
traceLib.set("active", getter(() -> !region.isGlobal() && Recorder.INSTANCE.get(region) instanceof ActiveTracer));
|
||||
traceLib.set("auto", getter(() -> !region.isGlobal() && Recorder.INSTANCE.get(region) instanceof AutoTraceRecorder));
|
||||
traceLib.set("status", getter(() -> Recorder.INSTANCE.get(region).scriptState()));
|
||||
traceLib.set("time", getter(() -> Recorder.INSTANCE.get(region).scriptTime()));
|
||||
|
||||
table.set("trace", traceLib);
|
||||
|
||||
|
In neuem Issue referenzieren
Einen Benutzer sperren