SteamWar/BauSystem2.0
Archiviert
12
0

LoaderRework #175

Zusammengeführt
YoyoNow hat 20 Commits von LoaderRework nach master 2023-05-09 18:31:42 +02:00 zusammengeführt
14 geänderte Dateien mit 107 neuen und 72 gelöschten Zeilen
Nur Änderungen aus Commit f4e98ca95a werden angezeigt - Alle Commits anzeigen

Datei anzeigen

@ -791,8 +791,8 @@ LOADER_RUNNING = §aRunning
LOADER_PAUSE = §7Pause
LOADER_END = §8Finished
LOADER_MESSAGE_INTERACT = §e{0} added {1}
LOADER_BUTTON_TNT = TNT
LOADER_MESSAGE_INTERACT=§e{0} added {1}
LOADER_BUTTON_TNT=TNT
LOADER_BUTTON_SWITCH=Lever
LOADER_BUTTON_WOOD_BUTTON=Wooden Button
LOADER_BUTTON_STONE_BUTTON=Stone Button
@ -835,15 +835,37 @@ LOADER_GUI_SETTINGS_DELETE=§cDelete
LOADER_GUI_WAIT_TITLE=Settings
LOADER_GUI_WAIT_BACK=§8Back
LOADER_GUI_CLICK_TO_EDIT=§7Click to edit
LOADER_GUI_CLICK_TO_EDIT=§7Klicke zum editieren
LOADER_GUI_ITEM_NAME=§7{0}§8: §e{1}
LOADER_SETTING_NAME=§7{0}
LOADER_SETTING_MODES=§7Modes§8: §e{0}
LOADER_SETTING_POWER=§7Power§8: §e{0}
LOADER_SETTING_MODES=§7Modi§8: §e{0}
LOADER_SETTING_POWER=§7Redstone Stärke§8: §e{0}
LOADER_SETTING_TICKS=§7Ticks§8: §e{0}
LOADER_SETTING_REPEATER=§7Repeater§8: §e{0}
LOADER_SETTING_WAIT=§7Wartezeit§8: §e{0} Tick(s)
LOADER_SETTING_WAIT_NAME=Wartezeit
LOADER_SETTING_TICKS_NAME=Ticks
LOADER_SETTING_TICKS_REMOVE_ONE=§c-1
LOADER_SETTING_TICKS_REMOVE_ONE_SHIFT=§7Shift§8: §c-5
LOADER_SETTING_TICKS_ADD_ONE=§a+1
LOADER_SETTING_TICKS_ADD_ONE_SHIFT=§7Shift§8: §a+5
LOADER_SETTING_TNT_NAME=§cTNT
LOADER_SETTING_TNT_X=§7X§8: §e{0}
LOADER_SETTING_TNT_Y=§7Y§8: §e{0}
LOADER_SETTING_TNT_Z=§7Z§8: §e{0}
LOADER_INTERACTION_NOOP=NOOP
LOADER_INTERACTION_INTERACT=Interact
LOADER_INTERACTION_POWERED=Powered
LOADER_INTERACTION_UNPOWERED=Unpowered
LOADER_INTERACTION_INTERACT=Interagiere
LOADER_INTERACTION_POWERED=Aktiviert
LOADER_INTERACTION_UNPOWERED=Deaktiviert
LOADER_INTERACTION_PAGE_PREV=Vorherige Seite
LOADER_INTERACTION_PAGE_NEXT=Nächste Seite
LOADER_INTERACTION_PAGE=Seite {0}
LOADER_INTERACTION_ACTIVE=Aktiviert
LOADER_INTERACTION_INACTIVE=Deaktiviert
LOADER_INTERACTION_WAIT_FOR=Darauf warten
LOADER_INTERACTION_NO_WAIT_FOR=Nicht darauf warten
LOADER_INTERACTION_OPEN=Geöffnet
LOADER_INTERACTION_CLOSED=Geschlossen
# Loadtimer
LOADTIMER_HELP_OVERVIEW=§7Compete with your friends loading your cannon and get information about the cannon

Datei anzeigen

@ -809,6 +809,36 @@ LOADER_GUI_WAIT_TITLE=Wartezeit
LOADER_GUI_WAIT_BACK=§8Zurück
LOADER_GUI_CLICK_TO_EDIT=§7Click to edit
LOADER_GUI_ITEM_NAME=§7{0}§8: §e{1}
LOADER_SETTING_NAME=§7{0}
LOADER_SETTING_MODES=§7Modes§8: §e{0}
LOADER_SETTING_POWER=§7Power§8: §e{0}
LOADER_SETTING_TICKS=§7Ticks§8: §e{0}
LOADER_SETTING_REPEATER=§7Repeater§8: §e{0}
LOADER_SETTING_WAIT=§7Wait§8: §e{0} Tick(s)
LOADER_SETTING_WAIT_NAME=Wait
LOADER_SETTING_TICKS_NAME=Ticks
LOADER_SETTING_TICKS_REMOVE_ONE=§c-1
LOADER_SETTING_TICKS_REMOVE_ONE_SHIFT=§7Shift§8: §c-5
LOADER_SETTING_TICKS_ADD_ONE=§a+1
LOADER_SETTING_TICKS_ADD_ONE_SHIFT=§7Shift§8: §a+5
LOADER_SETTING_TNT_NAME=§cTNT
LOADER_SETTING_TNT_X=§7X§8: §e{0}
LOADER_SETTING_TNT_Y=§7Y§8: §e{0}
LOADER_SETTING_TNT_Z=§7Z§8: §e{0}
LOADER_INTERACTION_NOOP=NOOP
LOADER_INTERACTION_INTERACT=Interact
LOADER_INTERACTION_POWERED=Powered
LOADER_INTERACTION_UNPOWERED=Unpowered
LOADER_INTERACTION_PAGE_PREV=Previous Page
LOADER_INTERACTION_PAGE_NEXT=Next Page
LOADER_INTERACTION_PAGE=Page {0}
LOADER_INTERACTION_ACTIVE=Active
LOADER_INTERACTION_INACTIVE=Inactive
LOADER_INTERACTION_WAIT_FOR=Wait for
LOADER_INTERACTION_NO_WAIT_FOR=No wait for
LOADER_INTERACTION_OPEN=Open
LOADER_INTERACTION_CLOSED=Closed
# Loadtimer
LOADTIMER_HELP_OVERVIEW=§7Messe dich und deine Freunde beim Beladen einer Kanone und bekomme informationen über die Kanone

Datei anzeigen

@ -36,10 +36,7 @@ import org.bukkit.event.EventHandler;
import org.bukkit.event.Listener;
import org.bukkit.event.player.PlayerQuitEvent;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.*;
public class Loader implements Listener {
@ -135,7 +132,9 @@ public class Loader implements Listener {
continue;
}
}
list.add(new SWListInv.SWListEntry<>(element.menu(p), element));
SWItem item = element.menu(p);
item.setLore(Arrays.asList(BauSystem.MESSAGE.parse("LOADER_SETTING_MODES", p, elements.size()), "§8", BauSystem.MESSAGE.parse("LOADER_GUI_CLICK_TO_EDIT", p)));
list.add(new SWListInv.SWListEntry<>(item, element));
}
SWListInv<LoaderElement> swListInv = new SWListInv<>(p, BauSystem.MESSAGE.parse("LOADER_GUI_TITLE", p), false, list, (clickType, loaderElement) -> {});
swListInv.setCallback((clickType, entry) -> entry.click(p, swListInv::open));

Datei anzeigen

@ -30,7 +30,7 @@ public interface ElementSettings {
default void playerInteract() {}
default String translateItemName(String name, String mode, Player player) {
return BauSystem.MESSAGE.parse("LOADER_GUI_ITEM_NAME", player, BauSystem.MESSAGE.parse(name, player), BauSystem.MESSAGE.parse(mode, player));
default String translateItemName(String name, String mode, Player player, Object... args) {
return BauSystem.MESSAGE.parse("LOADER_GUI_ITEM_NAME", player, BauSystem.MESSAGE.parse(name, player), BauSystem.MESSAGE.parse(mode, player, args));
}
}

Datei anzeigen

@ -148,9 +148,7 @@ public class LoaderDaylightDetector extends LoaderInteractionElement<LoaderDayli
@Override
public SWItem menu(Player player) {
SWItem swItem = new SWItem(Material.DAYLIGHT_DETECTOR, translateItemName("LOADER_BUTTON_DAYLIGHT_DETECTOR", player));
swItem.setLore(Arrays.asList(BauSystem.MESSAGE.parse("LOADER_SETTING_MODES", player, elements.size()), "§8", BauSystem.MESSAGE.parse("LOADER_GUI_CLICK_TO_EDIT", player)));
return swItem;
return new SWItem(Material.DAYLIGHT_DETECTOR, translateItemName("LOADER_BUTTON_DAYLIGHT_DETECTOR", player));
}
@Override

Datei anzeigen

@ -54,13 +54,13 @@ public class LoaderLectern extends LoaderInteractionElement<LoaderLectern.Lecter
private SWItem menu(Player player, boolean noop, LecternAction action, int page) {
SWItem swItem;
if (noop) {
swItem = new SWItem(Material.STRUCTURE_VOID, "§7Lectern§8: §eNOOP");
swItem = new SWItem(Material.STRUCTURE_VOID, translateItemName("LOADER_BUTTON_LECTERN", "LOADER_INTERACTION_NOOP", player));
} else if (action == LecternAction.PAGE_PREV) {
swItem = new SWItem(Material.STICK, "§7Lectern§8: §ePage Prev");
swItem = new SWItem(Material.STICK, translateItemName("LOADER_BUTTON_LECTERN", "LOADER_INTERACTION_PAGE_PREV", player));
} else if (action == LecternAction.PAGE_NEXT) {
swItem = new SWItem(Material.STICK, "§7Lectern§8: §ePage Next");
swItem = new SWItem(Material.STICK, translateItemName("LOADER_BUTTON_LECTERN", "LOADER_INTERACTION_PAGE_NEXT", player));
} else {
swItem = new SWItem(Material.LECTERN, "§7Lectern§8: §ePage " + page);
swItem = new SWItem(Material.LECTERN, translateItemName("LOADER_BUTTON_LECTERN", "LOADER_INTERACTION_PAGE", player, page));
swItem.getItemStack().setAmount(page);
}
swItem.setLore(Arrays.asList(BauSystem.MESSAGE.parse("LOADER_GUI_CLICK_TO_EDIT", player)));
@ -144,9 +144,7 @@ public class LoaderLectern extends LoaderInteractionElement<LoaderLectern.Lecter
@Override
public SWItem menu(Player player) {
SWItem swItem = new SWItem(Material.LECTERN, "§7Lectern");
swItem.setLore(Arrays.asList("§7Modes§8: §e" + elements.size(), "§8", "§7Click to edit"));
return swItem;
return new SWItem(Material.LECTERN, translateItemName("LOADER_BUTTON_LECTERN", player));
}
@Override

Datei anzeigen

@ -52,11 +52,11 @@ public class LoaderLever extends LoaderInteractionElement<LoaderLever.LeverSetti
private SWItem menu(Player player, boolean noop, boolean interact, boolean power) {
SWItem swItem;
if (noop) {
swItem = new SWItem(Material.STRUCTURE_VOID, "§7Lever§8: §eNOOP");
swItem = new SWItem(Material.STRUCTURE_VOID, translateItemName("LOADER_LEVER", "LOADER_INTERACTION_NOOP", player));
} else if (interact) {
swItem = new SWItem(Material.STICK, "§7Lever§8: §eInteract");
swItem = new SWItem(Material.STICK, translateItemName("LOADER_LEVER", "LOADER_INTERACTION_INTERACT", player));
} else {
swItem = new SWItem(Material.LEVER, "§7Lever§8: §e" + (power ? "Active" : "Inactive"));
swItem = new SWItem(Material.LEVER, translateItemName("LOADER_LEVER", power ? "LOADER_INTERACTION_ACTIVE" : "LOADER_INTERACTION_INACTIVE", player));
}
swItem.setLore(Arrays.asList(BauSystem.MESSAGE.parse("LOADER_GUI_CLICK_TO_EDIT", player)));
return swItem;
@ -121,9 +121,7 @@ public class LoaderLever extends LoaderInteractionElement<LoaderLever.LeverSetti
@Override
public SWItem menu(Player player) {
SWItem swItem = new SWItem(Material.LEVER, "§7Lever");
swItem.setLore(Arrays.asList("§7Modes§8: §e" + elements.size(), "§8", "§7Click to edit"));
return swItem;
return new SWItem(Material.LEVER, translateItemName("LOADER_BUTTON_LECTERN", player));
}
@Override

Datei anzeigen

@ -69,12 +69,12 @@ public class LoaderMovement extends LoaderInteractionElement<LoaderMovement.Move
private SWItem menu(Player player, boolean noop, boolean waitFor) {
SWItem swItem;
if (noop) {
swItem = new SWItem(Material.STRUCTURE_VOID, "§7" + name + "§8: §eNOOP");
swItem = new SWItem(Material.STRUCTURE_VOID, translateItemName(name, "LOADER_INTERACTION_NOOP", player));
} else if (waitFor) {
swItem = new SWItem(material, "§7" + name + "§8: §eWaitFor");
swItem = new SWItem(material, translateItemName(name, "LOADER_INTERACTION_WAIT_FOR", player));
swItem.getItemStack().setAmount((int) Math.min(ticks, 64));
} else {
swItem = new SWItem(material, "§7" + name + "§8: §eNoWaitFor");
swItem = new SWItem(material, translateItemName(name, "LOADER_INTERACTION_NO_WAIT_FOR", player));
swItem.getItemStack().setAmount((int) Math.min(ticks, 64));
swItem.setEnchanted(true);
}
@ -158,13 +158,13 @@ public class LoaderMovement extends LoaderInteractionElement<LoaderMovement.Move
});
}
swInventory.setItem(12, new SWItem(SWItem.getDye(1), "§c-1", Arrays.asList("§7Shift: §c-5"), false, clickType -> {}).getItemStack(), clickType -> {
swInventory.setItem(12, new SWItem(SWItem.getDye(1), BauSystem.MESSAGE.parse("LOADER_SETTING_TICKS_REMOVE_ONE", player), Arrays.asList(BauSystem.MESSAGE.parse("LOADER_SETTING_TICKS_REMOVE_ONE_SHIFT", player)), false, clickType -> {}).getItemStack(), clickType -> {
ticks -= clickType.isShiftClick() ? 5 : 1;
if (ticks < 1) ticks = 1;
swInventory.setItem(13, item(player));
});
swInventory.setItem(13, item(player).getItemStack(), clickType -> {
SWAnvilInv swAnvilInv = new SWAnvilInv(player, "Ticks", ticks + "");
SWAnvilInv swAnvilInv = new SWAnvilInv(player, BauSystem.MESSAGE.parse("LOADER_SETTING_TICKS_NAME", player), ticks + "");
swAnvilInv.setCallback(s -> {
try {
ticks = Long.parseLong(s);
@ -175,7 +175,7 @@ public class LoaderMovement extends LoaderInteractionElement<LoaderMovement.Move
});
swAnvilInv.open();
});
swInventory.setItem(14, new SWItem(SWItem.getDye(10), "§a+1", Arrays.asList("§7Shift: §a+5"), false, clickType -> {}).getItemStack(), clickType -> {
swInventory.setItem(14, new SWItem(SWItem.getDye(10), BauSystem.MESSAGE.parse("LOADER_SETTING_TICKS_ADD_ONE", player), Arrays.asList(BauSystem.MESSAGE.parse("LOADER_SETTING_TICKS_ADD_ONE_SHIFT", player)), false, clickType -> {}).getItemStack(), clickType -> {
ticks += clickType.isShiftClick() ? 5 : 1;
swInventory.setItem(13, item(player));
});
@ -205,25 +205,23 @@ public class LoaderMovement extends LoaderInteractionElement<LoaderMovement.Move
}
private SWItem item(Player player, int power) {
SWItem swItem = new SWItem(power == 0 ? Material.GUNPOWDER : Material.REDSTONE, "§7Power §8:§e " + power);
SWItem swItem = new SWItem(power == 0 ? Material.GUNPOWDER : Material.REDSTONE, BauSystem.MESSAGE.parse("LOADER_SETTING_POWER", player, power));
swItem.getItemStack().setAmount(power == 0 ? 1 : power);
if (!this.noop && this.power == power) swItem.setEnchanted(true);
return swItem;
}
private SWItem item(Player player) {
SWItem swItem = new SWItem(Material.CLOCK, "§7Ticks§8: §e" + ticks);
SWItem swItem = new SWItem(Material.CLOCK, BauSystem.MESSAGE.parse("LOADER_SETTING_TICKS", player, ticks));
swItem.getItemStack().setAmount((int) Math.min(ticks, 64));
swItem.setLore(Arrays.asList("§7Click to edit"));
swItem.setLore(Arrays.asList(BauSystem.MESSAGE.parse("LOADER_GUI_CLICK_TO_EDIT", player)));
return swItem;
}
}
@Override
public SWItem menu(Player player) {
SWItem swItem = new SWItem(material, "§7" + name);
swItem.setLore(Arrays.asList("§7Modes§8: §e" + elements.size(), "§8", "§7Click to edit"));
return swItem;
return new SWItem(material, translateItemName(name, player));
}
@Override

Datei anzeigen

@ -51,9 +51,9 @@ public class LoaderNoteBlock extends LoaderInteractionElement<LoaderNoteBlock.No
private SWItem menu(Player player, boolean interact) {
SWItem swItem;
if (interact) {
swItem = new SWItem(Material.NOTE_BLOCK, "§7Note Block§8: §eInteract");
swItem = new SWItem(Material.NOTE_BLOCK, translateItemName("LOADER_BUTTON_NOTEBLOCK", "LOADER_INTERACTION_INTERACT", player));
} else {
swItem = new SWItem(Material.STRUCTURE_VOID, "§7Note Block§8: §eNOOP");
swItem = new SWItem(Material.STRUCTURE_VOID, translateItemName("LOADER_BUTTON_NOTEBLOCK", "LOADER_INTERACTION_NOOP", player));
}
swItem.setLore(Arrays.asList(BauSystem.MESSAGE.parse("LOADER_GUI_CLICK_TO_EDIT", player)));
return swItem;
@ -104,9 +104,7 @@ public class LoaderNoteBlock extends LoaderInteractionElement<LoaderNoteBlock.No
@Override
public SWItem menu(Player player) {
SWItem swItem = new SWItem(Material.NOTE_BLOCK, "§7Note Block");
swItem.setLore(Arrays.asList("§7Modes§8: §e" + elements.size(), "§8", "§7Click to edit"));
return swItem;
return new SWItem(Material.NOTE_BLOCK, translateItemName("LOADER_BUTTON_NOTEBLOCK", player));
}
@Override

Datei anzeigen

@ -57,11 +57,11 @@ public class LoaderOpenable extends LoaderInteractionElement<LoaderOpenable.Trap
private SWItem menu(Player player, boolean noop, boolean interact, boolean powered) {
SWItem swItem;
if (noop) {
swItem = new SWItem(Material.STRUCTURE_VOID, "§7" + name +"§8: §eNOOP");
swItem = new SWItem(Material.STRUCTURE_VOID, translateItemName(name, "LOADER_INTERACTION_NOOP", player));
} else if (interact) {
swItem = new SWItem(Material.STICK, "§7" + name + "§8: §eInteract");
swItem = new SWItem(Material.STICK, translateItemName(name, "LOADER_INTERACTION_INTERACT", player));
} else {
swItem = new SWItem(material, "§7" + name + "§8: §e" + (powered ? "Open" : "Closed"));
swItem = new SWItem(material, translateItemName(name, open ? "LOADER_INTERACTION_OPEN" : "LOADER_INTERACTION_CLOSED", player));
}
swItem.setLore(Arrays.asList(BauSystem.MESSAGE.parse("LOADER_GUI_CLICK_TO_EDIT", player)));
return swItem;
@ -126,9 +126,7 @@ public class LoaderOpenable extends LoaderInteractionElement<LoaderOpenable.Trap
@Override
public SWItem menu(Player player) {
SWItem swItem = new SWItem(material, "§7" + name);
swItem.setLore(Arrays.asList("§7Modes§8: §e" + elements.size(), "§8", "§7Click to edit"));
return swItem;
return new SWItem(material, translateItemName(name, player));
}
@Override

Datei anzeigen

@ -51,11 +51,11 @@ public class LoaderRepeater extends LoaderInteractionElement<LoaderRepeater.Repe
private SWItem menu(Player player, boolean interact, int delay) {
SWItem swItem;
if (interact) {
swItem = new SWItem(Material.STICK, "§7Repeater§8: §eInteract");
swItem = new SWItem(Material.STICK, translateItemName("LOADER_BUTTON_REPEATER", "LOADER_INTERACTION_INTERACT", player));
} else if (delay == 0) {
swItem = new SWItem(Material.STRUCTURE_VOID, "§7Repeater§8: §eNOOP");
swItem = new SWItem(Material.STRUCTURE_VOID, translateItemName("LOADER_BUTTON_REPEATER", "LOADER_INTERACTION_NOOP", player));
} else {
swItem = new SWItem(Material.REPEATER, "§7Repeater§8: §e" + delay);
swItem = new SWItem(Material.REPEATER, BauSystem.MESSAGE.parse("LOADER_SETTING_REPEATER", player, delay));
swItem.getItemStack().setAmount(delay);
}
swItem.setLore(Arrays.asList(BauSystem.MESSAGE.parse("LOADER_GUI_CLICK_TO_EDIT", player)));
@ -138,9 +138,7 @@ public class LoaderRepeater extends LoaderInteractionElement<LoaderRepeater.Repe
@Override
public SWItem menu(Player player) {
SWItem swItem = new SWItem(Material.REPEATER, "§7Repeater");
swItem.setLore(Arrays.asList("§7Modes§8: §e" + elements.size(), "§8", "§7Click to edit"));
return swItem;
return new SWItem(Material.REPEATER, translateItemName("LOADER_BUTTON_REPEATER", player));
}
@Override

Datei anzeigen

@ -40,8 +40,8 @@ public class LoaderTNT implements LoaderElement {
@Override
public SWItem menu(Player player) {
SWItem item = new SWItem(Material.TNT, "§cTNT");
item.setLore(Arrays.asList("§7X§8: " + location.getBlockX(), "§7Y§8: " + location.getBlockY(), "§7Z§8: " + location.getBlockZ()));
SWItem item = new SWItem(Material.TNT, BauSystem.MESSAGE.parse("LOADER_SETTING_TNT_NAME", player));
item.setLore(Arrays.asList(BauSystem.MESSAGE.parse("LOADER_SETTING_TNT_X", player, location.getBlockX()), BauSystem.MESSAGE.parse("LOADER_SETTING_TNT_Y", player, location.getBlockY()), BauSystem.MESSAGE.parse("LOADER_SETTING_TNT_Z", player, location.getBlockZ())));
return item;
}

Datei anzeigen

@ -59,11 +59,11 @@ public class LoaderTicks extends LoaderInteractionElement<LoaderTicks.TicksSetti
private SWItem menu(Player player, boolean noop, boolean waitFor) {
SWItem swItem;
if (noop) {
swItem = new SWItem(Material.STRUCTURE_VOID, "§7" + name + "§8: §eNOOP");
swItem = new SWItem(Material.STRUCTURE_VOID, translateItemName(name, "LOADER_INTERACTION_NOOP", player));
} else if (waitFor) {
swItem = new SWItem(material, "§7" + name + "§8: §eWaitFor");
swItem = new SWItem(material, translateItemName(name, "LOADER_INTERACTION_WAIT_FOR", player, ticks));
} else {
swItem = new SWItem(material, "§7" + name + "§8: §eNoWaitFor");
swItem = new SWItem(material, translateItemName(name, "LOADER_INTERACTION_NO_WAIT_FOR", player, ticks));
swItem.setEnchanted(true);
}
swItem.setLore(Arrays.asList(BauSystem.MESSAGE.parse("LOADER_GUI_CLICK_TO_EDIT", player)));
@ -139,9 +139,7 @@ public class LoaderTicks extends LoaderInteractionElement<LoaderTicks.TicksSetti
@Override
public SWItem menu(Player player) {
SWItem swItem = new SWItem(material, "§7" + name);
swItem.setLore(Arrays.asList("§7Modes§8: §e" + elements.size(), "§8", "§7Click to edit"));
return swItem;
return new SWItem(material, translateItemName(name, player));
}
@Override

Datei anzeigen

@ -45,7 +45,7 @@ public class LoaderWait implements LoaderElement, Listener {
@Override
public SWItem menu(Player player) {
SWItem swItem = new SWItem(Material.CLOCK, "§7Wartezeit: §e" + delay + " Ticks");
SWItem swItem = new SWItem(Material.CLOCK, BauSystem.MESSAGE.parse("LOADER_SETTING_WAIT", player, delay));
swItem.getItemStack().setAmount((int) Math.max(Math.min(delay, 64), 1));
if (delay == 0) swItem.setEnchanted(true);
swItem.setLore(Arrays.asList(BauSystem.MESSAGE.parse("LOADER_GUI_CLICK_TO_EDIT", player)));
@ -67,13 +67,13 @@ public class LoaderWait implements LoaderElement, Listener {
for (int i = 9; i < 18; i++) swInventory.setItem(i, new SWItem(Material.GRAY_STAINED_GLASS_PANE, "§7"));
swInventory.setItem(9, new SWItem(Material.ARROW, BauSystem.MESSAGE.parse("LOADER_GUI_WAIT_BACK", player)).getItemStack(), clickType -> backAction.run());
swInventory.setItem(3, new SWItem(SWItem.getDye(1), "§c-1", Arrays.asList("§7Shift: §c-5"), false, clickType -> {}).getItemStack(), clickType -> {
swInventory.setItem(3, new SWItem(SWItem.getDye(1), BauSystem.MESSAGE.parse("LOADER_SETTING_TICKS_REMOVE_ONE", player), Arrays.asList(BauSystem.MESSAGE.parse("LOADER_SETTING_TICKS_REMOVE_ONE_SHIFT", player)), false, clickType -> {}).getItemStack(), clickType -> {
delay -= clickType.isShiftClick() ? 5 : 1;
if (delay < 0) delay = 0;
swInventory.setItem(4, menu(player));
});
swInventory.setItem(4, menu(player).getItemStack(), clickType -> {
SWAnvilInv swAnvilInv = new SWAnvilInv(player, "§7Wartezeit", delay + "");
SWAnvilInv swAnvilInv = new SWAnvilInv(player, BauSystem.MESSAGE.parse("LOADER_SETTING_WAIT_NAME", player), delay + "");
swAnvilInv.setCallback(s -> {
try {
delay = Long.parseLong(s);
@ -84,7 +84,7 @@ public class LoaderWait implements LoaderElement, Listener {
});
swAnvilInv.open();
});
swInventory.setItem(5, new SWItem(SWItem.getDye(10), "§a+1", Arrays.asList("§7Shift: §a+5"), false, clickType -> {}).getItemStack(), clickType -> {
swInventory.setItem(5, new SWItem(SWItem.getDye(10), BauSystem.MESSAGE.parse("LOADER_SETTING_TICKS_ADD_ONE", player), Arrays.asList(BauSystem.MESSAGE.parse("LOADER_SETTING_TICKS_ADD_ONE_SHIFT", player)), false, clickType -> {}).getItemStack(), clickType -> {
delay += clickType.isShiftClick() ? 5 : 1;
swInventory.setItem(4, menu(player));
});