Signed-off-by: yoyosource <yoyosource@nidido.de>
Dieser Commit ist enthalten in:
Ursprung
7c9c27ae3e
Commit
f4e98ca95a
@ -835,15 +835,37 @@ LOADER_GUI_SETTINGS_DELETE=§cDelete
|
|||||||
LOADER_GUI_WAIT_TITLE=Settings
|
LOADER_GUI_WAIT_TITLE=Settings
|
||||||
LOADER_GUI_WAIT_BACK=§8Back
|
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_GUI_ITEM_NAME=§7{0}§8: §e{1}
|
||||||
LOADER_SETTING_NAME=§7{0}
|
LOADER_SETTING_NAME=§7{0}
|
||||||
LOADER_SETTING_MODES=§7Modes§8: §e{0}
|
LOADER_SETTING_MODES=§7Modi§8: §e{0}
|
||||||
LOADER_SETTING_POWER=§7Power§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_NOOP=NOOP
|
||||||
LOADER_INTERACTION_INTERACT=Interact
|
LOADER_INTERACTION_INTERACT=Interagiere
|
||||||
LOADER_INTERACTION_POWERED=Powered
|
LOADER_INTERACTION_POWERED=Aktiviert
|
||||||
LOADER_INTERACTION_UNPOWERED=Unpowered
|
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
|
||||||
LOADTIMER_HELP_OVERVIEW=§7Compete with your friends loading your cannon and get information about the cannon
|
LOADTIMER_HELP_OVERVIEW=§7Compete with your friends loading your cannon and get information about the cannon
|
||||||
|
@ -809,6 +809,36 @@ LOADER_GUI_WAIT_TITLE=Wartezeit
|
|||||||
LOADER_GUI_WAIT_BACK=§8Zurück
|
LOADER_GUI_WAIT_BACK=§8Zurück
|
||||||
|
|
||||||
LOADER_GUI_CLICK_TO_EDIT=§7Click to edit
|
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
|
||||||
LOADTIMER_HELP_OVERVIEW=§7Messe dich und deine Freunde beim Beladen einer Kanone und bekomme informationen über die Kanone
|
LOADTIMER_HELP_OVERVIEW=§7Messe dich und deine Freunde beim Beladen einer Kanone und bekomme informationen über die Kanone
|
||||||
|
@ -36,10 +36,7 @@ import org.bukkit.event.EventHandler;
|
|||||||
import org.bukkit.event.Listener;
|
import org.bukkit.event.Listener;
|
||||||
import org.bukkit.event.player.PlayerQuitEvent;
|
import org.bukkit.event.player.PlayerQuitEvent;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.*;
|
||||||
import java.util.HashMap;
|
|
||||||
import java.util.List;
|
|
||||||
import java.util.Map;
|
|
||||||
|
|
||||||
public class Loader implements Listener {
|
public class Loader implements Listener {
|
||||||
|
|
||||||
@ -135,7 +132,9 @@ public class Loader implements Listener {
|
|||||||
continue;
|
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<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));
|
swListInv.setCallback((clickType, entry) -> entry.click(p, swListInv::open));
|
||||||
|
@ -30,7 +30,7 @@ public interface ElementSettings {
|
|||||||
|
|
||||||
default void playerInteract() {}
|
default void playerInteract() {}
|
||||||
|
|
||||||
default String translateItemName(String name, String mode, Player 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));
|
return BauSystem.MESSAGE.parse("LOADER_GUI_ITEM_NAME", player, BauSystem.MESSAGE.parse(name, player), BauSystem.MESSAGE.parse(mode, player, args));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -148,9 +148,7 @@ public class LoaderDaylightDetector extends LoaderInteractionElement<LoaderDayli
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public SWItem menu(Player player) {
|
public SWItem menu(Player player) {
|
||||||
SWItem swItem = new SWItem(Material.DAYLIGHT_DETECTOR, translateItemName("LOADER_BUTTON_DAYLIGHT_DETECTOR", player));
|
return 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;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -54,13 +54,13 @@ public class LoaderLectern extends LoaderInteractionElement<LoaderLectern.Lecter
|
|||||||
private SWItem menu(Player player, boolean noop, LecternAction action, int page) {
|
private SWItem menu(Player player, boolean noop, LecternAction action, int page) {
|
||||||
SWItem swItem;
|
SWItem swItem;
|
||||||
if (noop) {
|
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) {
|
} 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) {
|
} 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 {
|
} 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.getItemStack().setAmount(page);
|
||||||
}
|
}
|
||||||
swItem.setLore(Arrays.asList(BauSystem.MESSAGE.parse("LOADER_GUI_CLICK_TO_EDIT", player)));
|
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
|
@Override
|
||||||
public SWItem menu(Player player) {
|
public SWItem menu(Player player) {
|
||||||
SWItem swItem = new SWItem(Material.LECTERN, "§7Lectern");
|
return new SWItem(Material.LECTERN, translateItemName("LOADER_BUTTON_LECTERN", player));
|
||||||
swItem.setLore(Arrays.asList("§7Modes§8: §e" + elements.size(), "§8", "§7Click to edit"));
|
|
||||||
return swItem;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -52,11 +52,11 @@ public class LoaderLever extends LoaderInteractionElement<LoaderLever.LeverSetti
|
|||||||
private SWItem menu(Player player, boolean noop, boolean interact, boolean power) {
|
private SWItem menu(Player player, boolean noop, boolean interact, boolean power) {
|
||||||
SWItem swItem;
|
SWItem swItem;
|
||||||
if (noop) {
|
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) {
|
} else if (interact) {
|
||||||
swItem = new SWItem(Material.STICK, "§7Lever§8: §eInteract");
|
swItem = new SWItem(Material.STICK, translateItemName("LOADER_LEVER", "LOADER_INTERACTION_INTERACT", player));
|
||||||
} else {
|
} 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)));
|
swItem.setLore(Arrays.asList(BauSystem.MESSAGE.parse("LOADER_GUI_CLICK_TO_EDIT", player)));
|
||||||
return swItem;
|
return swItem;
|
||||||
@ -121,9 +121,7 @@ public class LoaderLever extends LoaderInteractionElement<LoaderLever.LeverSetti
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public SWItem menu(Player player) {
|
public SWItem menu(Player player) {
|
||||||
SWItem swItem = new SWItem(Material.LEVER, "§7Lever");
|
return new SWItem(Material.LEVER, translateItemName("LOADER_BUTTON_LECTERN", player));
|
||||||
swItem.setLore(Arrays.asList("§7Modes§8: §e" + elements.size(), "§8", "§7Click to edit"));
|
|
||||||
return swItem;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -69,12 +69,12 @@ public class LoaderMovement extends LoaderInteractionElement<LoaderMovement.Move
|
|||||||
private SWItem menu(Player player, boolean noop, boolean waitFor) {
|
private SWItem menu(Player player, boolean noop, boolean waitFor) {
|
||||||
SWItem swItem;
|
SWItem swItem;
|
||||||
if (noop) {
|
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) {
|
} 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));
|
swItem.getItemStack().setAmount((int) Math.min(ticks, 64));
|
||||||
} else {
|
} 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.getItemStack().setAmount((int) Math.min(ticks, 64));
|
||||||
swItem.setEnchanted(true);
|
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;
|
ticks -= clickType.isShiftClick() ? 5 : 1;
|
||||||
if (ticks < 1) ticks = 1;
|
if (ticks < 1) ticks = 1;
|
||||||
swInventory.setItem(13, item(player));
|
swInventory.setItem(13, item(player));
|
||||||
});
|
});
|
||||||
swInventory.setItem(13, item(player).getItemStack(), clickType -> {
|
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 -> {
|
swAnvilInv.setCallback(s -> {
|
||||||
try {
|
try {
|
||||||
ticks = Long.parseLong(s);
|
ticks = Long.parseLong(s);
|
||||||
@ -175,7 +175,7 @@ public class LoaderMovement extends LoaderInteractionElement<LoaderMovement.Move
|
|||||||
});
|
});
|
||||||
swAnvilInv.open();
|
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;
|
ticks += clickType.isShiftClick() ? 5 : 1;
|
||||||
swInventory.setItem(13, item(player));
|
swInventory.setItem(13, item(player));
|
||||||
});
|
});
|
||||||
@ -205,25 +205,23 @@ public class LoaderMovement extends LoaderInteractionElement<LoaderMovement.Move
|
|||||||
}
|
}
|
||||||
|
|
||||||
private SWItem item(Player player, int power) {
|
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);
|
swItem.getItemStack().setAmount(power == 0 ? 1 : power);
|
||||||
if (!this.noop && this.power == power) swItem.setEnchanted(true);
|
if (!this.noop && this.power == power) swItem.setEnchanted(true);
|
||||||
return swItem;
|
return swItem;
|
||||||
}
|
}
|
||||||
|
|
||||||
private SWItem item(Player player) {
|
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.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;
|
return swItem;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public SWItem menu(Player player) {
|
public SWItem menu(Player player) {
|
||||||
SWItem swItem = new SWItem(material, "§7" + name);
|
return new SWItem(material, translateItemName(name, player));
|
||||||
swItem.setLore(Arrays.asList("§7Modes§8: §e" + elements.size(), "§8", "§7Click to edit"));
|
|
||||||
return swItem;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -51,9 +51,9 @@ public class LoaderNoteBlock extends LoaderInteractionElement<LoaderNoteBlock.No
|
|||||||
private SWItem menu(Player player, boolean interact) {
|
private SWItem menu(Player player, boolean interact) {
|
||||||
SWItem swItem;
|
SWItem swItem;
|
||||||
if (interact) {
|
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 {
|
} 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)));
|
swItem.setLore(Arrays.asList(BauSystem.MESSAGE.parse("LOADER_GUI_CLICK_TO_EDIT", player)));
|
||||||
return swItem;
|
return swItem;
|
||||||
@ -104,9 +104,7 @@ public class LoaderNoteBlock extends LoaderInteractionElement<LoaderNoteBlock.No
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public SWItem menu(Player player) {
|
public SWItem menu(Player player) {
|
||||||
SWItem swItem = new SWItem(Material.NOTE_BLOCK, "§7Note Block");
|
return new SWItem(Material.NOTE_BLOCK, translateItemName("LOADER_BUTTON_NOTEBLOCK", player));
|
||||||
swItem.setLore(Arrays.asList("§7Modes§8: §e" + elements.size(), "§8", "§7Click to edit"));
|
|
||||||
return swItem;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -57,11 +57,11 @@ public class LoaderOpenable extends LoaderInteractionElement<LoaderOpenable.Trap
|
|||||||
private SWItem menu(Player player, boolean noop, boolean interact, boolean powered) {
|
private SWItem menu(Player player, boolean noop, boolean interact, boolean powered) {
|
||||||
SWItem swItem;
|
SWItem swItem;
|
||||||
if (noop) {
|
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) {
|
} else if (interact) {
|
||||||
swItem = new SWItem(Material.STICK, "§7" + name + "§8: §eInteract");
|
swItem = new SWItem(Material.STICK, translateItemName(name, "LOADER_INTERACTION_INTERACT", player));
|
||||||
} else {
|
} 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)));
|
swItem.setLore(Arrays.asList(BauSystem.MESSAGE.parse("LOADER_GUI_CLICK_TO_EDIT", player)));
|
||||||
return swItem;
|
return swItem;
|
||||||
@ -126,9 +126,7 @@ public class LoaderOpenable extends LoaderInteractionElement<LoaderOpenable.Trap
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public SWItem menu(Player player) {
|
public SWItem menu(Player player) {
|
||||||
SWItem swItem = new SWItem(material, "§7" + name);
|
return new SWItem(material, translateItemName(name, player));
|
||||||
swItem.setLore(Arrays.asList("§7Modes§8: §e" + elements.size(), "§8", "§7Click to edit"));
|
|
||||||
return swItem;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -51,11 +51,11 @@ public class LoaderRepeater extends LoaderInteractionElement<LoaderRepeater.Repe
|
|||||||
private SWItem menu(Player player, boolean interact, int delay) {
|
private SWItem menu(Player player, boolean interact, int delay) {
|
||||||
SWItem swItem;
|
SWItem swItem;
|
||||||
if (interact) {
|
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) {
|
} 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 {
|
} 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.getItemStack().setAmount(delay);
|
||||||
}
|
}
|
||||||
swItem.setLore(Arrays.asList(BauSystem.MESSAGE.parse("LOADER_GUI_CLICK_TO_EDIT", player)));
|
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
|
@Override
|
||||||
public SWItem menu(Player player) {
|
public SWItem menu(Player player) {
|
||||||
SWItem swItem = new SWItem(Material.REPEATER, "§7Repeater");
|
return new SWItem(Material.REPEATER, translateItemName("LOADER_BUTTON_REPEATER", player));
|
||||||
swItem.setLore(Arrays.asList("§7Modes§8: §e" + elements.size(), "§8", "§7Click to edit"));
|
|
||||||
return swItem;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -40,8 +40,8 @@ public class LoaderTNT implements LoaderElement {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public SWItem menu(Player player) {
|
public SWItem menu(Player player) {
|
||||||
SWItem item = new SWItem(Material.TNT, "§cTNT");
|
SWItem item = new SWItem(Material.TNT, BauSystem.MESSAGE.parse("LOADER_SETTING_TNT_NAME", player));
|
||||||
item.setLore(Arrays.asList("§7X§8: " + location.getBlockX(), "§7Y§8: " + location.getBlockY(), "§7Z§8: " + location.getBlockZ()));
|
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;
|
return item;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -59,11 +59,11 @@ public class LoaderTicks extends LoaderInteractionElement<LoaderTicks.TicksSetti
|
|||||||
private SWItem menu(Player player, boolean noop, boolean waitFor) {
|
private SWItem menu(Player player, boolean noop, boolean waitFor) {
|
||||||
SWItem swItem;
|
SWItem swItem;
|
||||||
if (noop) {
|
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) {
|
} else if (waitFor) {
|
||||||
swItem = new SWItem(material, "§7" + name + "§8: §eWaitFor");
|
swItem = new SWItem(material, translateItemName(name, "LOADER_INTERACTION_WAIT_FOR", player, ticks));
|
||||||
} else {
|
} 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.setEnchanted(true);
|
||||||
}
|
}
|
||||||
swItem.setLore(Arrays.asList(BauSystem.MESSAGE.parse("LOADER_GUI_CLICK_TO_EDIT", player)));
|
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
|
@Override
|
||||||
public SWItem menu(Player player) {
|
public SWItem menu(Player player) {
|
||||||
SWItem swItem = new SWItem(material, "§7" + name);
|
return new SWItem(material, translateItemName(name, player));
|
||||||
swItem.setLore(Arrays.asList("§7Modes§8: §e" + elements.size(), "§8", "§7Click to edit"));
|
|
||||||
return swItem;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -45,7 +45,7 @@ public class LoaderWait implements LoaderElement, Listener {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public SWItem menu(Player player) {
|
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));
|
swItem.getItemStack().setAmount((int) Math.max(Math.min(delay, 64), 1));
|
||||||
if (delay == 0) swItem.setEnchanted(true);
|
if (delay == 0) swItem.setEnchanted(true);
|
||||||
swItem.setLore(Arrays.asList(BauSystem.MESSAGE.parse("LOADER_GUI_CLICK_TO_EDIT", player)));
|
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"));
|
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(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;
|
delay -= clickType.isShiftClick() ? 5 : 1;
|
||||||
if (delay < 0) delay = 0;
|
if (delay < 0) delay = 0;
|
||||||
swInventory.setItem(4, menu(player));
|
swInventory.setItem(4, menu(player));
|
||||||
});
|
});
|
||||||
swInventory.setItem(4, menu(player).getItemStack(), clickType -> {
|
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 -> {
|
swAnvilInv.setCallback(s -> {
|
||||||
try {
|
try {
|
||||||
delay = Long.parseLong(s);
|
delay = Long.parseLong(s);
|
||||||
@ -84,7 +84,7 @@ public class LoaderWait implements LoaderElement, Listener {
|
|||||||
});
|
});
|
||||||
swAnvilInv.open();
|
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;
|
delay += clickType.isShiftClick() ? 5 : 1;
|
||||||
swInventory.setItem(4, menu(player));
|
swInventory.setItem(4, menu(player));
|
||||||
});
|
});
|
||||||
|
In neuem Issue referenzieren
Einen Benutzer sperren