From bb654018d602792ac27f77b6a8ea322af8ff54e4 Mon Sep 17 00:00:00 2001 From: yoyosource Date: Sun, 7 May 2023 01:43:28 +0200 Subject: [PATCH] Update some multilingual stuff for Loader and LoaderCommand Signed-off-by: yoyosource --- BauSystem_Main/src/BauSystem.properties | 10 ++++++++++ BauSystem_Main/src/BauSystem_de.properties | 10 ++++++++++ .../bausystem/features/loadern/Loader.java | 20 +++++++++---------- .../features/loadern/LoaderCommand.java | 2 +- 4 files changed, 31 insertions(+), 11 deletions(-) diff --git a/BauSystem_Main/src/BauSystem.properties b/BauSystem_Main/src/BauSystem.properties index 9a9f24af..7a451354 100644 --- a/BauSystem_Main/src/BauSystem.properties +++ b/BauSystem_Main/src/BauSystem.properties @@ -807,7 +807,9 @@ LOADER_BUTTON_LECTERN=Lectern LOADER_BUTTON_TRAPDOOR=Trapdoor LOADER_BUTTON_DOOR=Door LOADER_BUTTON_FENCEGATE=Fencegate + LOADER_HELP_SETUP=§8/§eloader setup §8- §7Starts recording actions +LOADER_SETUP_STOP_FIRST=§cPlease stop the current loader first! LOADER_HELP_START=§8/§eloader start §8- §7Playback of previously recorded action LOADER_HELP_PAUSE=§8/§7loader pause §8- §7Pauses Loader LOADER_HELP_GUI=§8/§7loader gui §8- §7Shows Loader gui @@ -820,6 +822,14 @@ LOADER_STOP=§7The Loader has been stopped. LOADER_PAUSED=§7The Loader is now paused. LOADER_PERMS=§cYou are not allowed to use the Loader here +LOADER_NOTHING_RECORDED=§cYou have not recorded anything yet! +LOADER_GUI_TITLE=Loader GUI +LOADER_GUI_SHOW_INTERACTIONS=§eShow only Interactions +LOADER_GUI_SHOW_WAITS=§eShow only Waits +LOADER_GUI_SHOW_WAITS_SET_BETWEEN_TNT=§7Wait Time between TNT +LOADER_GUI_SHOW_WAITS_SET_ALL=§7Wait Time all +LOADER_GUI_SHOW_WAITS_TITLE=§7Wait Time + # Loadtimer LOADTIMER_HELP_OVERVIEW=§7Compete with your friends loading your cannon and get information about the cannon LOADTIMER_HELP_START_1=§8/§eloadtimer start §8-§7 Starts the simple Loadtimer diff --git a/BauSystem_Main/src/BauSystem_de.properties b/BauSystem_Main/src/BauSystem_de.properties index e0d12fa6..38a4e4cb 100644 --- a/BauSystem_Main/src/BauSystem_de.properties +++ b/BauSystem_Main/src/BauSystem_de.properties @@ -780,7 +780,9 @@ LOADER_BUTTON_LECTERN=Lectern LOADER_BUTTON_TRAPDOOR=Trapdoor LOADER_BUTTON_DOOR=Door LOADER_BUTTON_FENCEGATE=Fencegate + LOADER_HELP_SETUP=§8/§eloader setup §8- §7Startet die Aufnahme der Aktionen +LOADER_SETUP_STOP_FIRST=§cBitte stoppe zuerst den Loader LOADER_HELP_START=§8/§eloader start §8- §7Spielt die zuvor aufgenommenen Aktionen ab LOADER_HELP_PAUSE=§8/§7loader pause §8- §7Pausiert das Abspielen LOADER_HELP_GUI=§8/§7loader settings §8- §7Zeigt die Einstellungen an @@ -793,6 +795,14 @@ LOADER_STOP=§7Der Loader ist nun gestoppt. LOADER_PAUSED=§7Der Loader ist nun pausiert. LOADER_PERMS=§cDu darfst hier nicht den Detonator nutzen +LOADER_NOTHING_RECORDED=§cEs wurden keine Elemente aufgenommen! +LOADER_GUI_TITLE=Loader Einstellungen +LOADER_GUI_SHOW_INTERACTIONS=§eZeige Interaktionen +LOADER_GUI_SHOW_WAITS=§eZeige Wartezeiten +LOADER_GUI_SHOW_WAITS_SET_BETWEEN_TNT=§7Wait Time zwischen TNT +LOADER_GUI_SHOW_WAITS_SET_ALL=§7Wait Time alle +LOADER_GUI_SHOW_WAITS_TITLE=§7Wartezeit + # Loadtimer LOADTIMER_HELP_OVERVIEW=§7Messe dich und deine Freunde beim Beladen einer Kanone und bekomme informationen über die Kanone LOADTIMER_HELP_START_1=§8/§eloadtimer start §8-§7 Startet den einfachen Loadtimer diff --git a/BauSystem_Main/src/de/steamwar/bausystem/features/loadern/Loader.java b/BauSystem_Main/src/de/steamwar/bausystem/features/loadern/Loader.java index d5b48efa..a50ad0bc 100644 --- a/BauSystem_Main/src/de/steamwar/bausystem/features/loadern/Loader.java +++ b/BauSystem_Main/src/de/steamwar/bausystem/features/loadern/Loader.java @@ -97,7 +97,7 @@ public class Loader implements Listener { recorder = null; } if (elements.isEmpty()) { - p.sendMessage("§cEs wurden keine Elemente aufgenommen!"); + BauSystem.MESSAGE.send("LOADER_NOTHING_RECORDED", p); stop(); return; } @@ -137,24 +137,24 @@ public class Loader implements Listener { } list.add(new SWListInv.SWListEntry<>(element.menu(p), element)); } - SWListInv swListInv = new SWListInv<>(p, "Loader Settings", false, list, (clickType, loaderElement) -> {}); + SWListInv swListInv = new SWListInv<>(p, BauSystem.MESSAGE.parse("LOADER_GUI_TITLE", p), false, list, (clickType, loaderElement) -> {}); swListInv.setCallback((clickType, entry) -> entry.click(p, swListInv::open)); - SWItem onlyInteractionsElements = new SWItem(Material.REPEATER, "§eNur Interaktionen", clickType -> { + SWItem onlyInteractionsElements = new SWItem(Material.REPEATER, BauSystem.MESSAGE.parse("LOADER_GUI_SHOW_INTERACTIONS", p), clickType -> { gui(settingsSorting == SettingsSorting.INTERACTIONS ? null : SettingsSorting.INTERACTIONS); }); if (settingsSorting == SettingsSorting.INTERACTIONS) onlyInteractionsElements.setEnchanted(true); swListInv.setItem(47, onlyInteractionsElements); - SWItem onlyWaitElements = new SWItem(Material.CLOCK, "§eNur Warten", clickType -> { + SWItem onlyWaitElements = new SWItem(Material.CLOCK, BauSystem.MESSAGE.parse("LOADER_GUI_SHOW_WAITS", p), clickType -> { gui(settingsSorting == SettingsSorting.WAIT ? null : SettingsSorting.WAIT); }); if (settingsSorting == SettingsSorting.WAIT) onlyWaitElements.setEnchanted(true); swListInv.setItem(48, onlyWaitElements); if (settingsSorting == SettingsSorting.WAIT) { - SWItem waitBetweenTNT = new SWItem(Material.TNT, "§7Wait Time zwischen TNT", clickType -> { - SWAnvilInv swAnvilInv = new SWAnvilInv(p, "§7Wartezeit", ""); + SWItem waitBetweenTNT = new SWItem(Material.TNT, BauSystem.MESSAGE.parse("LOADER_GUI_SHOW_WAITS_SET_BETWEEN_TNT", p), clickType -> { + SWAnvilInv swAnvilInv = new SWAnvilInv(p, BauSystem.MESSAGE.parse("LOADER_GUI_SHOW_WAITS_TITLE", p), ""); swAnvilInv.setCallback(s -> { try { long delay = Long.parseLong(s); @@ -173,8 +173,8 @@ public class Loader implements Listener { }); swListInv.setItem(50, waitBetweenTNT); - SWItem waitTime = new SWItem(Material.PAPER, "§7Wait Time alle", clickType -> { - SWAnvilInv swAnvilInv = new SWAnvilInv(p, "§7Wartezeit", ""); + SWItem waitTime = new SWItem(Material.PAPER, BauSystem.MESSAGE.parse("LOADER_GUI_SHOW_WAITS_SET_ALL", p), clickType -> { + SWAnvilInv swAnvilInv = new SWAnvilInv(p, BauSystem.MESSAGE.parse("LOADER_GUI_SHOW_WAITS_TITLE", p), ""); swAnvilInv.setCallback(s -> { try { long delay = Long.parseLong(s); @@ -186,9 +186,9 @@ public class Loader implements Listener { .forEach(loaderWait -> loaderWait.setDelay(finalDelay)); } catch (NumberFormatException ignored) { } - swListInv.open(); + gui(settingsSorting); }); - gui(settingsSorting); + swAnvilInv.open(); }); swListInv.setItem(51, waitTime); } else { diff --git a/BauSystem_Main/src/de/steamwar/bausystem/features/loadern/LoaderCommand.java b/BauSystem_Main/src/de/steamwar/bausystem/features/loadern/LoaderCommand.java index 5799bc6e..070b2e95 100644 --- a/BauSystem_Main/src/de/steamwar/bausystem/features/loadern/LoaderCommand.java +++ b/BauSystem_Main/src/de/steamwar/bausystem/features/loadern/LoaderCommand.java @@ -44,7 +44,7 @@ public class LoaderCommand extends SWCommand { @Register(value = "setup", description = "LOADER_HELP_SETUP") public void setupLoader(@Validator Player player) { if (Loader.getLoader(player) != null) { - player.sendMessage("Please stop the current loader first!"); + BauSystem.MESSAGE.send("LOADER_SETUP_STOP_FIRST", player); return; } Loader.newLoader(player);