From 794be6cdf9e60511b79684e5e006a81ccc43443c Mon Sep 17 00:00:00 2001 From: zOnlyKroks Date: Mon, 27 Dec 2021 13:11:09 +0100 Subject: [PATCH 01/34] DebugstickBauGuiItem --- BauSystem_Main/src/BauSystem.properties | 1 + .../bausystem/features/util/items/DebugstickBauGuiItem.java | 3 ++- build.gradle | 2 +- 3 files changed, 4 insertions(+), 2 deletions(-) diff --git a/BauSystem_Main/src/BauSystem.properties b/BauSystem_Main/src/BauSystem.properties index 133603dc..ffd06e23 100644 --- a/BauSystem_Main/src/BauSystem.properties +++ b/BauSystem_Main/src/BauSystem.properties @@ -851,6 +851,7 @@ OTHER_TPS_SINGLE = §8TPS: §e{0} OTHER_WORLDSPAWN_HELP=§8/§eworldspawn §8-§e Teleportiere dich zum Spawn # DebugStick DEBUG-STICK_COMMAND_HELP=§8/§edebugstick §8-§7 Erhalte einen DebugStick +DEBUG-STICK_NAME=DEBUGSTIC # StructureVoid STRUCTURE-VOID_COMMAND_HELP=§8/§estructureVoid §8-§7 Erhalte ein StructureVoid # NightVision diff --git a/BauSystem_Main/src/de/steamwar/bausystem/features/util/items/DebugstickBauGuiItem.java b/BauSystem_Main/src/de/steamwar/bausystem/features/util/items/DebugstickBauGuiItem.java index 8915dceb..8b78101e 100644 --- a/BauSystem_Main/src/de/steamwar/bausystem/features/util/items/DebugstickBauGuiItem.java +++ b/BauSystem_Main/src/de/steamwar/bausystem/features/util/items/DebugstickBauGuiItem.java @@ -19,6 +19,7 @@ package de.steamwar.bausystem.features.util.items; +import de.steamwar.bausystem.BauSystem; import de.steamwar.bausystem.Permission; import de.steamwar.bausystem.config.ColorConfig; import de.steamwar.bausystem.linkage.specific.BauGuiItem; @@ -39,7 +40,7 @@ public class DebugstickBauGuiItem extends BauGuiItem { @Override public ItemStack getItem(Player player) { - return new SWItem(Material.DEBUG_STICK, ColorConfig.HIGHLIGHT + "Debugstick").getItemStack(); + return new SWItem(Material.DEBUG_STICK, ColorConfig.HIGHLIGHT + BauSystem.MESSAGE.parse("DEBUG-STICK_NAME", player)).getItemStack(); } @Override diff --git a/build.gradle b/build.gradle index 0392b342..d084a399 100644 --- a/build.gradle +++ b/build.gradle @@ -150,7 +150,7 @@ private def await(Process proc) { } private def shell(String command) { - if (operatingSystem == "unix") { + if (operatingSystem == "unix" && false) { return ['bash', '-c', command].execute() } else { return ["cmd", "/c", command].execute() From 221f5cbf6167fd68c17efe800d42716dcba6c0cc Mon Sep 17 00:00:00 2001 From: zOnlyKroks Date: Mon, 27 Dec 2021 13:17:40 +0100 Subject: [PATCH 02/34] DebugstickBauGuiItem --- BauSystem_Main/src/BauSystem.properties | 2 +- .../bausystem/features/util/items/DebugstickBauGuiItem.java | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/BauSystem_Main/src/BauSystem.properties b/BauSystem_Main/src/BauSystem.properties index ffd06e23..2d0d963f 100644 --- a/BauSystem_Main/src/BauSystem.properties +++ b/BauSystem_Main/src/BauSystem.properties @@ -851,7 +851,7 @@ OTHER_TPS_SINGLE = §8TPS: §e{0} OTHER_WORLDSPAWN_HELP=§8/§eworldspawn §8-§e Teleportiere dich zum Spawn # DebugStick DEBUG-STICK_COMMAND_HELP=§8/§edebugstick §8-§7 Erhalte einen DebugStick -DEBUG-STICK_NAME=DEBUGSTIC +DEBUG-STICK_NAME=&eDEBUGSTICK # StructureVoid STRUCTURE-VOID_COMMAND_HELP=§8/§estructureVoid §8-§7 Erhalte ein StructureVoid # NightVision diff --git a/BauSystem_Main/src/de/steamwar/bausystem/features/util/items/DebugstickBauGuiItem.java b/BauSystem_Main/src/de/steamwar/bausystem/features/util/items/DebugstickBauGuiItem.java index 8b78101e..3202fe2d 100644 --- a/BauSystem_Main/src/de/steamwar/bausystem/features/util/items/DebugstickBauGuiItem.java +++ b/BauSystem_Main/src/de/steamwar/bausystem/features/util/items/DebugstickBauGuiItem.java @@ -40,7 +40,7 @@ public class DebugstickBauGuiItem extends BauGuiItem { @Override public ItemStack getItem(Player player) { - return new SWItem(Material.DEBUG_STICK, ColorConfig.HIGHLIGHT + BauSystem.MESSAGE.parse("DEBUG-STICK_NAME", player)).getItemStack(); + return new SWItem(Material.DEBUG_STICK, BauSystem.MESSAGE.parse("DEBUG-STICK_NAME", player)).getItemStack(); } @Override From ebe4d638f67eb892cd0e09778c6fcf53d2efbc13 Mon Sep 17 00:00:00 2001 From: yoyosource Date: Mon, 27 Dec 2021 13:32:25 +0100 Subject: [PATCH 03/34] Update DepthCounter Update DepthCounterCommand Signed-off-by: yoyosource --- BauSystem_Main/src/BauSystem.properties | 15 ++++++++- .../testblock/depthcounter/DepthCounter.java | 32 +++++++------------ .../depthcounter/DepthCounterCommand.java | 25 +++++---------- .../features/util/DebugStickCommand.java | 2 -- 4 files changed, 34 insertions(+), 40 deletions(-) diff --git a/BauSystem_Main/src/BauSystem.properties b/BauSystem_Main/src/BauSystem.properties index ffd06e23..e38a719f 100644 --- a/BauSystem_Main/src/BauSystem.properties +++ b/BauSystem_Main/src/BauSystem.properties @@ -607,7 +607,20 @@ BLOCK_COUNTER_ENABLE = §7BlockCounter angemacht BLOCK_COUNTER_DISABLE = §7BlockCounter ausgemacht # DepthCounter - +DEPTH_COUNTER_COMMAND_ENABLE_HELP = §8/§edepthcounter enable §8- §7Aktiviere den Tiefenzähler +DEPTH_COUNTER_COMMAND_DISABLE_HELP = §8/§edepthcounter disable §8- §7Deaktiviere den Tiefenzähler +DEPTH_COUNTER_COMMAND_INFO_HELP = §8/§edepthcounter info §8- §7Zähle aktive Zählmodi auf +DEPTH_COUNTER_COMMAND_TOGGLE_HELP = §8/§edepthcounter toggle §8<§7CountMode§8> §8- §7Stelle einzelne Zählmodi ein +DEPTH_COUNTER_ENABLE_MESSAGE = §7Du hast den Tiefenzähler aktiviert. +DEPTH_COUNTER_DISABLE_MESSAGE = §7Du hast den Tiefenzähler deaktiviert. +DEPTH_COUNTER_ACTIVE_MESSAGE = §7Aktive Zählmodi: §e{0}§8. +DEPTH_COUNTER_MESSAGE = §7Schaden §8> §7 +DEPTH_COUNTER_HIGHLIGHT = §e +DEPTH_COUNTER_SEPARATOR = §7 §7 +DEPTH_COUNTER_X = X: {0} +DEPTH_COUNTER_Y = Y: {0} +DEPTH_COUNTER_Z = Z: {0} +DEPTH_COUNTER_TNT = §7TNT§8: §e{0} # TPSLimit TICK_STEP_HELP = §8/§etick step §8<§7Ticks§8> §8- §7Spule n Ticks vor diff --git a/BauSystem_Main/src/de/steamwar/bausystem/features/testblock/depthcounter/DepthCounter.java b/BauSystem_Main/src/de/steamwar/bausystem/features/testblock/depthcounter/DepthCounter.java index d4194ae9..551fa2d6 100644 --- a/BauSystem_Main/src/de/steamwar/bausystem/features/testblock/depthcounter/DepthCounter.java +++ b/BauSystem_Main/src/de/steamwar/bausystem/features/testblock/depthcounter/DepthCounter.java @@ -20,7 +20,6 @@ package de.steamwar.bausystem.features.testblock.depthcounter; import de.steamwar.bausystem.BauSystem; -import de.steamwar.bausystem.config.ColorConfig; import de.steamwar.bausystem.configplayer.Config; import de.steamwar.bausystem.region.Region; import lombok.experimental.UtilityClass; @@ -105,8 +104,6 @@ public class DepthCounter { return null; } - final StringBuilder result = new StringBuilder(BauSystem.PREFIX).append("Schaden ").append(ColorConfig.OTHER).append("> ").append(ColorConfig.BASE); - final Set dimensions = new HashSet<>(); if (xActive) { dimensions.add(x); @@ -120,31 +117,26 @@ public class DepthCounter { int max = getMax(dimensions); + StringBuilder st = new StringBuilder(); if (xActive) { - if (x == max) { - result.append(ColorConfig.HIGHLIGHT).append("X: ").append(x).append(ColorConfig.BASE).append(" "); - } else { - result.append("X: ").append(x).append(" "); - } + st.append(x == max ? BauSystem.MESSAGE.parse("DEPTH_COUNTER_HIGHLIGHT", player) : "") + .append(BauSystem.MESSAGE.parse("DEPTH_COUNTER_X", player, x)) + .append(BauSystem.MESSAGE.parse("DEPTH_COUNTER_SEPARATOR", player)); } if (yActive) { - if (y == max) { - result.append(ColorConfig.HIGHLIGHT).append("Y: ").append(y).append(ColorConfig.BASE).append(" "); - } else { - result.append("Y: ").append(y).append(" "); - } + st.append(y == max ? BauSystem.MESSAGE.parse("DEPTH_COUNTER_HIGHLIGHT", player) : "") + .append(BauSystem.MESSAGE.parse("DEPTH_COUNTER_Y", player, y)) + .append(BauSystem.MESSAGE.parse("DEPTH_COUNTER_SEPARATOR", player)); } if (zActive) { - if (z == max) { - result.append(ColorConfig.HIGHLIGHT).append("Z: ").append(z).append(ColorConfig.BASE).append(" "); - } else { - result.append("Z: ").append(z).append(" "); - } + st.append(z == max ? BauSystem.MESSAGE.parse("DEPTH_COUNTER_HIGHLIGHT", player) : "") + .append(BauSystem.MESSAGE.parse("DEPTH_COUNTER_Z", player, z)) + .append(BauSystem.MESSAGE.parse("DEPTH_COUNTER_SEPARATOR", player)); } - result.append(ColorConfig.BASE).append("TNT").append(ColorConfig.OTHER).append(": ").append(ColorConfig.HIGHLIGHT).append(tntCount); - return result.toString(); + st.append(BauSystem.MESSAGE.parse("DEPTH_COUNTER_TNT", player, tntCount)); + return BauSystem.MESSAGE.parse("DEPTH_COUNTER_MESSAGE", player, st.toString()); } } \ No newline at end of file diff --git a/BauSystem_Main/src/de/steamwar/bausystem/features/testblock/depthcounter/DepthCounterCommand.java b/BauSystem_Main/src/de/steamwar/bausystem/features/testblock/depthcounter/DepthCounterCommand.java index 6c37e317..e1a91a60 100644 --- a/BauSystem_Main/src/de/steamwar/bausystem/features/testblock/depthcounter/DepthCounterCommand.java +++ b/BauSystem_Main/src/de/steamwar/bausystem/features/testblock/depthcounter/DepthCounterCommand.java @@ -26,7 +26,6 @@ import de.steamwar.bausystem.linkage.Linked; import de.steamwar.command.SWCommand; import org.bukkit.entity.Player; - @Linked(LinkageType.COMMAND) public class DepthCounterCommand extends SWCommand { @@ -34,35 +33,27 @@ public class DepthCounterCommand extends SWCommand { super("depthcounter", "depthcount", "dcounter", "dcount"); } - @Register - public void genericHelp(Player p, String... args) { - p.sendMessage(ColorConfig.OTHER + "/" + ColorConfig.HIGHLIGHT + "depthcounter enable" + ColorConfig.OTHER + " - " + ColorConfig.BASE + "Aktiviere den Tiefenzähler"); - p.sendMessage(ColorConfig.OTHER + "/" + ColorConfig.HIGHLIGHT + "depthcounter disable" + ColorConfig.OTHER + " - " + ColorConfig.BASE + "Deaktiviere den Tiefenzähler"); - p.sendMessage(ColorConfig.OTHER + "/" + ColorConfig.HIGHLIGHT + "depthcounter info" + ColorConfig.OTHER + " - " + ColorConfig.BASE + "Zähle aktive Zählmodi auf"); - p.sendMessage(ColorConfig.OTHER + "/" + ColorConfig.HIGHLIGHT + "depthcounter toggle " + ColorConfig.OTHER + "<" + ColorConfig.BASE + "CountMode" + ColorConfig.OTHER + ">" + ColorConfig.OTHER + " - " + ColorConfig.BASE + "Stelle einzelne Zählmodi ein"); - } - - @Register("toggle") + @Register(value = "toggle", description = "DEPTH_COUNTER_COMMAND_TOGGLE_HELP") public void toggleCommand(Player p, CountMode countMode) { DepthCounter.toggleMode(p, countMode); p.sendMessage(BauSystem.PREFIX + "Aktive Zählmodi: " + ColorConfig.HIGHLIGHT + DepthCounter.getModes(p) + ColorConfig.BASE + "."); } - @Register("enable") + @Register(value = "enable", description = "DEPTH_COUNTER_COMMAND_ENABLE_HELP") public void enableCommand(Player p) { DepthCounter.setModes(p, CountMode.ALL()); - p.sendMessage(BauSystem.PREFIX + "Du hast den Tiefenzähler aktiviert."); - p.sendMessage(BauSystem.PREFIX + "Aktive Zählmodi: " + ColorConfig.HIGHLIGHT + DepthCounter.getModes(p) + ColorConfig.BASE + "."); + BauSystem.MESSAGE.send("DEPTH_COUNTER_ENABLE_MESSAGE", p); + BauSystem.MESSAGE.send("DEPTH_COUNTER_ACTIVE_MESSAGE", p, DepthCounter.getModes(p).toString()); } - @Register("disable") + @Register(value = "disable", description = "DEPTH_COUNTER_COMMAND_DISABLE_HELP") public void disableCommand(Player p) { DepthCounter.removePlayer(p); - p.sendMessage(BauSystem.PREFIX + "Du hast den Tiefenzähler deaktiviert."); + BauSystem.MESSAGE.send("DEPTH_COUNTER_DISABLE_MESSAGE", p); } - @Register("info") + @Register(value = "info", description = "DEPTH_COUNTER_COMMAND_INFO_HELP") public void infoCommand(Player p) { - p.sendMessage(BauSystem.PREFIX + "Aktive Zählmodi: " + ColorConfig.HIGHLIGHT + DepthCounter.getModes(p) + ColorConfig.BASE + "."); + BauSystem.MESSAGE.send("DEPTH_COUNTER_ACTIVE_MESSAGE", p, DepthCounter.getModes(p).toString()); } } \ No newline at end of file diff --git a/BauSystem_Main/src/de/steamwar/bausystem/features/util/DebugStickCommand.java b/BauSystem_Main/src/de/steamwar/bausystem/features/util/DebugStickCommand.java index edb695b4..3b5f0079 100644 --- a/BauSystem_Main/src/de/steamwar/bausystem/features/util/DebugStickCommand.java +++ b/BauSystem_Main/src/de/steamwar/bausystem/features/util/DebugStickCommand.java @@ -19,7 +19,6 @@ package de.steamwar.bausystem.features.util; -import de.steamwar.bausystem.BauSystem; import de.steamwar.bausystem.SWUtils; import de.steamwar.bausystem.linkage.LinkageType; import de.steamwar.bausystem.linkage.Linked; @@ -39,5 +38,4 @@ public class DebugStickCommand extends SWCommand { public void genericCommand(Player p) { SWUtils.giveItemToPlayer(p, new ItemStack(Material.DEBUG_STICK)); } - } From 6c44331947f30acf70151a26ea7bbc5ec7808751 Mon Sep 17 00:00:00 2001 From: zOnlyKroks Date: Mon, 27 Dec 2021 13:38:34 +0100 Subject: [PATCH 04/34] WandBauGuiItem --- BauSystem_Main/src/BauSystem.properties | 6 +++++- .../features/util/items/NavWandBauGuiItem.java | 12 +++++------- 2 files changed, 10 insertions(+), 8 deletions(-) diff --git a/BauSystem_Main/src/BauSystem.properties b/BauSystem_Main/src/BauSystem.properties index 2d0d963f..8d99c39d 100644 --- a/BauSystem_Main/src/BauSystem.properties +++ b/BauSystem_Main/src/BauSystem.properties @@ -851,13 +851,17 @@ OTHER_TPS_SINGLE = §8TPS: §e{0} OTHER_WORLDSPAWN_HELP=§8/§eworldspawn §8-§e Teleportiere dich zum Spawn # DebugStick DEBUG-STICK_COMMAND_HELP=§8/§edebugstick §8-§7 Erhalte einen DebugStick -DEBUG-STICK_NAME=&eDEBUGSTICK +DEBUG-STICK=&eDEBUGSTICK # StructureVoid STRUCTURE-VOID_COMMAND_HELP=§8/§estructureVoid §8-§7 Erhalte ein StructureVoid # NightVision NIGHT-VISION_COMMAND_HELP=§8/§enightvision §8-§7 Schalte Nightvision an oder aus. NIGHT-VISION_OFF=§eNightvision deaktiviert NIGHT-VISION_ON=§eNightvision aktiviert +#Navigation Wand +NAVIGATION-WAND=&eNavigation Wand +NAVIGATION-WAND_LEFT_CLICK="&eLeft click: jump to location" +NAVIGATION-WAND_RIGHT_CLICK="&eRight click: pass through walls" # Material MATERIAL_INV_NAME=§eMaterial {0}/{1} MATERIAL_SEARCH=§eSuchen diff --git a/BauSystem_Main/src/de/steamwar/bausystem/features/util/items/NavWandBauGuiItem.java b/BauSystem_Main/src/de/steamwar/bausystem/features/util/items/NavWandBauGuiItem.java index 067c24d4..f2a9bb9b 100644 --- a/BauSystem_Main/src/de/steamwar/bausystem/features/util/items/NavWandBauGuiItem.java +++ b/BauSystem_Main/src/de/steamwar/bausystem/features/util/items/NavWandBauGuiItem.java @@ -19,6 +19,7 @@ package de.steamwar.bausystem.features.util.items; +import de.steamwar.bausystem.BauSystem; import de.steamwar.bausystem.Permission; import de.steamwar.bausystem.linkage.LinkageType; import de.steamwar.bausystem.linkage.Linked; @@ -38,19 +39,16 @@ public class NavWandBauGuiItem extends BauGuiItem { super(27); } - @Override - public Permission permission() { + @Override public Permission permission() { return Permission.WORLDEDIT; } - @Override - public ItemStack getItem(Player player) { - return new SWItem(Material.COMPASS, "Navigation Wand", Arrays.asList("Left click: jump to location", "Right click: pass through walls"), false, clickType -> { + @Override public ItemStack getItem(Player player) { + return new SWItem(Material.COMPASS, BauSystem.MESSAGE.parse("NAVIGATION-WAND", player), Arrays.asList(BauSystem.MESSAGE.parse("NAVIGATION-WAND_LEFT_CLICK", player), BauSystem.MESSAGE.parse("NAVIGATION-WAND_RIGHT_CLICK", player)), false, clickType -> { }).getItemStack(); } - @Override - public boolean click(ClickType click, Player p) { + @Override public boolean click(ClickType click, Player p) { p.performCommand("/wand -n"); p.closeInventory(); return false; From e17f148093bad944c97d8830c3b04fdc0c0c5d2e Mon Sep 17 00:00:00 2001 From: zOnlyKroks Date: Mon, 27 Dec 2021 13:38:55 +0100 Subject: [PATCH 05/34] WandBauGuiItem --- .gitignore | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.gitignore b/.gitignore index 36e1257e..174842a0 100644 --- a/.gitignore +++ b/.gitignore @@ -12,4 +12,5 @@ steamwar.properties *.iml # Other -lib \ No newline at end of file +lib +/BauSystem_Main/build.gradle \ No newline at end of file From f1bf08abea51f8ace8263fd263eeae8419af385a Mon Sep 17 00:00:00 2001 From: zOnlyKroks Date: Mon, 27 Dec 2021 13:40:58 +0100 Subject: [PATCH 06/34] Updated naming --- BauSystem_Main/src/BauSystem.properties | 6 +++--- .../bausystem/features/util/items/NavWandBauGuiItem.java | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/BauSystem_Main/src/BauSystem.properties b/BauSystem_Main/src/BauSystem.properties index 3f592b05..cdca032e 100644 --- a/BauSystem_Main/src/BauSystem.properties +++ b/BauSystem_Main/src/BauSystem.properties @@ -872,9 +872,9 @@ NIGHT-VISION_COMMAND_HELP=§8/§enightvision §8-§7 Schalte Nightvision an oder NIGHT-VISION_OFF=§eNightvision deaktiviert NIGHT-VISION_ON=§eNightvision aktiviert #Navigation Wand -NAVIGATION-WAND=&eNavigation Wand -NAVIGATION-WAND_LEFT_CLICK="&eLeft click: jump to location" -NAVIGATION-WAND_RIGHT_CLICK="&eRight click: pass through walls" +NAVIGATION_WAND=&eNavigation Wand +NAVIGATION_WAND_LEFT_CLICK="&eLeft click: jump to location" +NAVIGATION_WAND_RIGHT_CLICK="&eRight click: pass through walls" # Material MATERIAL_INV_NAME=§eMaterial {0}/{1} MATERIAL_SEARCH=§eSuchen diff --git a/BauSystem_Main/src/de/steamwar/bausystem/features/util/items/NavWandBauGuiItem.java b/BauSystem_Main/src/de/steamwar/bausystem/features/util/items/NavWandBauGuiItem.java index f2a9bb9b..e35da4b8 100644 --- a/BauSystem_Main/src/de/steamwar/bausystem/features/util/items/NavWandBauGuiItem.java +++ b/BauSystem_Main/src/de/steamwar/bausystem/features/util/items/NavWandBauGuiItem.java @@ -44,7 +44,7 @@ public class NavWandBauGuiItem extends BauGuiItem { } @Override public ItemStack getItem(Player player) { - return new SWItem(Material.COMPASS, BauSystem.MESSAGE.parse("NAVIGATION-WAND", player), Arrays.asList(BauSystem.MESSAGE.parse("NAVIGATION-WAND_LEFT_CLICK", player), BauSystem.MESSAGE.parse("NAVIGATION-WAND_RIGHT_CLICK", player)), false, clickType -> { + return new SWItem(Material.COMPASS, BauSystem.MESSAGE.parse("NAVIGATION_WAND", player), Arrays.asList(BauSystem.MESSAGE.parse("NAVIGATION_WAND_LEFT_CLICK", player), BauSystem.MESSAGE.parse("NAVIGATION_WAND_RIGHT_CLICK", player)), false, clickType -> { }).getItemStack(); } From a3246d1898975b942c0e613c388ebe5e0c4e3645 Mon Sep 17 00:00:00 2001 From: yoyosource Date: Mon, 27 Dec 2021 13:43:16 +0100 Subject: [PATCH 07/34] Fix Echo Signed-off-by: yoyosource --- BauSystem_Main/src/BauSystem.properties | 1 + .../steamwar/bausystem/features/script/command/io/Echo.java | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/BauSystem_Main/src/BauSystem.properties b/BauSystem_Main/src/BauSystem.properties index 3f592b05..87615d5c 100644 --- a/BauSystem_Main/src/BauSystem.properties +++ b/BauSystem_Main/src/BauSystem.properties @@ -262,6 +262,7 @@ SCRIPT_COMMAND_ARITHMETIC_SUB_ERROR = §cNur Zahlen können subtrahiert werden SCRIPT_COMMAND_IO_ECHO_HELP_1 = §eecho §8<§7Wert§8> SCRIPT_COMMAND_IO_ECHO_HELP_2 = §7Schreibe etwas dem Spieler. Wenn kein Wert angegeben wurde ist die Nachricht leer. +SCRIPT_COMMAND_IO_ECHO_MESSAGE = {0} SCRIPT_COMMAND_IO_ECHOACTIONBAR_HELP_1 = §eechoactionbar §8<§7Wert§8> SCRIPT_COMMAND_IO_ECHOACTIONBAR_HELP_2 = §7Schreibe etwas dem Spieler in der ActionBar. Wenn kein Wert angegeben wurde ist die Nachricht leer. diff --git a/BauSystem_Main/src/de/steamwar/bausystem/features/script/command/io/Echo.java b/BauSystem_Main/src/de/steamwar/bausystem/features/script/command/io/Echo.java index a6aab4ed..e5f0d05e 100644 --- a/BauSystem_Main/src/de/steamwar/bausystem/features/script/command/io/Echo.java +++ b/BauSystem_Main/src/de/steamwar/bausystem/features/script/command/io/Echo.java @@ -33,7 +33,7 @@ public class Echo implements SpecialCommand { @Override public boolean execute(String[] command, ScriptExecutor scriptExecutor) { if (command.length <= 1) { - scriptExecutor.getPlayer().sendMessage(BauSystem.PREFIX + ""); + BauSystem.MESSAGE.send("SCRIPT_COMMAND_IO_ECHO_MESSAGE", scriptExecutor.getPlayer(), ""); return true; } StringBuilder st = new StringBuilder(); @@ -43,7 +43,7 @@ public class Echo implements SpecialCommand { } st.append(command[i]); } - scriptExecutor.getPlayer().sendMessage(BauSystem.PREFIX + ChatColor.translateAlternateColorCodes('&', st.toString())); + BauSystem.MESSAGE.send("SCRIPT_COMMAND_IO_ECHO_MESSAGE", scriptExecutor.getPlayer(), ChatColor.translateAlternateColorCodes('&', st.toString())); return true; } } From 09f501e03d58f838da788903373ed8deb1f91e61 Mon Sep 17 00:00:00 2001 From: zOnlyKroks Date: Mon, 27 Dec 2021 13:44:45 +0100 Subject: [PATCH 08/34] NightVisionBauGuiItem --- BauSystem_Main/src/BauSystem.properties | 2 ++ .../bausystem/features/util/items/NightVisionBauGuiItem.java | 5 +++-- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/BauSystem_Main/src/BauSystem.properties b/BauSystem_Main/src/BauSystem.properties index cdca032e..2e24dd50 100644 --- a/BauSystem_Main/src/BauSystem.properties +++ b/BauSystem_Main/src/BauSystem.properties @@ -871,6 +871,8 @@ STRUCTURE-VOID_COMMAND_HELP=§8/§estructureVoid §8-§7 Erhalte ein StructureVo NIGHT-VISION_COMMAND_HELP=§8/§enightvision §8-§7 Schalte Nightvision an oder aus. NIGHT-VISION_OFF=§eNightvision deaktiviert NIGHT-VISION_ON=§eNightvision aktiviert +NIGHT_VISION_ITEM_ON:&Nightvision: &eAktiviert +NIGHT_VISION_ITEM_OFF:&Nightvision: &eDeaktiviert #Navigation Wand NAVIGATION_WAND=&eNavigation Wand NAVIGATION_WAND_LEFT_CLICK="&eLeft click: jump to location" diff --git a/BauSystem_Main/src/de/steamwar/bausystem/features/util/items/NightVisionBauGuiItem.java b/BauSystem_Main/src/de/steamwar/bausystem/features/util/items/NightVisionBauGuiItem.java index b57ae401..a49dde98 100644 --- a/BauSystem_Main/src/de/steamwar/bausystem/features/util/items/NightVisionBauGuiItem.java +++ b/BauSystem_Main/src/de/steamwar/bausystem/features/util/items/NightVisionBauGuiItem.java @@ -19,6 +19,7 @@ package de.steamwar.bausystem.features.util.items; +import de.steamwar.bausystem.BauSystem; import de.steamwar.bausystem.Permission; import de.steamwar.bausystem.config.ColorConfig; import de.steamwar.bausystem.linkage.specific.BauGuiItem; @@ -46,12 +47,12 @@ public class NightVisionBauGuiItem extends BauGuiItem { ItemStack itemStack = new ItemStack(Material.POTION); PotionMeta meta = (PotionMeta) itemStack.getItemMeta(); meta.setColor(PotionEffectType.NIGHT_VISION.getColor()); - meta.setDisplayName(ColorConfig.BASE + "Nightvision: " + ColorConfig.HIGHLIGHT + "Aktiviert"); + meta.setDisplayName(BauSystem.MESSAGE.parse("NIGHT_VISION_ITEM_ON", player)); meta.addItemFlags(ItemFlag.HIDE_POTION_EFFECTS); itemStack.setItemMeta(meta); return itemStack; } else { - return new SWItem(Material.GLASS_BOTTLE, ColorConfig.BASE + "Nightvision: " + ColorConfig.HIGHLIGHT + "Deaktiviert").getItemStack(); + return new SWItem(Material.GLASS_BOTTLE, BauSystem.MESSAGE.parse("NIGHT_VISION_ITEM_OFF", player)).getItemStack(); } } From 72cf3f63b5b2ffe714addcbcb61d7b192e3cc42e Mon Sep 17 00:00:00 2001 From: yoyosource Date: Mon, 27 Dec 2021 13:48:20 +0100 Subject: [PATCH 09/34] Update WarpCommand to new CommandFramework Signed-off-by: yoyosource --- BauSystem_Main/src/BauSystem.properties | 12 ++-- .../bausystem/features/warp/WarpCommand.java | 57 ++++++++----------- 2 files changed, 30 insertions(+), 39 deletions(-) diff --git a/BauSystem_Main/src/BauSystem.properties b/BauSystem_Main/src/BauSystem.properties index 3c187e4a..81e705bf 100644 --- a/BauSystem_Main/src/BauSystem.properties +++ b/BauSystem_Main/src/BauSystem.properties @@ -1077,12 +1077,12 @@ WARP_GUI_DISTANCE=§7Distanz: §e{0} §7Blöcke WARP_GUI_LCLICK=§7Links klicken zum teleportieren WARP_GUI_RCLICK=§7Rechts klicken zum editieren WARP_INFO_NAME=§7Name: §e{0} -WARP_HELP_1=§8/§ewarp add §8[§7Name§8] - §7Erstelle einen neuen Warp Punkt -WARP_HELP_2=§8/§ewarp §8[§7Name§8] - §7Teleportiere dich zu einen Warp-Punkt -WARP_HELP_3=§8/§ewarp info §8[§7Name§8] - §7Infos zu einem Punkt -WARP_HELP_4=§8/§ewarp delete §8[§7Name§8] - §7Lösche einen Warp -WARP_HELP_5=§8/§ewarp gui - §7Öffne die Warp-GUI -WARP_HELP_6=§8/§ewarp list - §7Liste alle Warp-Punkt auf +WARP_HELP_ADD=§8/§ewarp add §8[§7Name§8] §8- §7Erstelle einen neuen Warp Punkt +WARP_HELP_TELEPORT=§8/§ewarp §8[§7Name§8] §8- §7Teleportiere dich zu einen Warp-Punkt +WARP_HELP_INFO=§8/§ewarp info §8[§7Name§8] §8- §7Infos zu einem Punkt +WARP_HELP_DELETE=§8/§ewarp delete §8[§7Name§8] §8- §7Lösche einen Warp +WARP_HELP_GUI=§8/§ewarp gui §8- §7Öffne die Warp-GUI +WARP_HELP_LIST=§8/§ewarp list §8- §7Liste alle Warp-Punkt auf WARP_MOON_ITEM_NAME=§3Atemkugel WARP_MOON_COUNTDOOWN=§7Noch §e§l{0} §7Sekunden! diff --git a/BauSystem_Main/src/de/steamwar/bausystem/features/warp/WarpCommand.java b/BauSystem_Main/src/de/steamwar/bausystem/features/warp/WarpCommand.java index e18f9940..0234ea42 100644 --- a/BauSystem_Main/src/de/steamwar/bausystem/features/warp/WarpCommand.java +++ b/BauSystem_Main/src/de/steamwar/bausystem/features/warp/WarpCommand.java @@ -27,9 +27,7 @@ import de.steamwar.bausystem.linkage.LinkageType; import de.steamwar.bausystem.linkage.Linked; import de.steamwar.bausystem.utils.ListChatView; import de.steamwar.bausystem.worlddata.WorldData; -import de.steamwar.command.SWCommand; -import de.steamwar.command.SWCommandUtils; -import de.steamwar.command.TypeMapper; +import de.steamwar.command.*; import net.md_5.bungee.api.ChatColor; import net.md_5.bungee.api.chat.ClickEvent; import net.md_5.bungee.api.chat.ComponentBuilder; @@ -58,25 +56,14 @@ public class WarpCommand extends SWCommand implements Disable, Enable { return SWCommandUtils.createMapper(Warp::getWarp, (commandSender, s) -> new ArrayList<>(Warp.getWarpNames())); } - @Register(help = true) - public void genericHelp(Player player, String... args) { - if (args.length > 0 && args[0].equals("moon")) { - Moon.startMoon(player); - return; - } - BauSystem.MESSAGE.sendPrefixless("COMMAND_HELP_HEAD", player, "Warp"); - BauSystem.MESSAGE.sendPrefixless("WARP_HELP_1", player); - BauSystem.MESSAGE.sendPrefixless("WARP_HELP_2", player); - BauSystem.MESSAGE.sendPrefixless("WARP_HELP_3", player); - BauSystem.MESSAGE.sendPrefixless("WARP_HELP_4", player); - BauSystem.MESSAGE.sendPrefixless("WARP_HELP_5", player); - BauSystem.MESSAGE.sendPrefixless("WARP_HELP_6", player); + @Register(value = "moon", noTabComplete = true) + public void tpMoon(Player p) { + Moon.startMoon(p); } - @Register("add") + @Register(value = "add", description = "WARP_HELP_ADD") @Register("create") - public void addWarp(Player player, String name) { - if (!permissionCheck(player)) return; + public void addWarp(@Guard Player player, String name) { for (String forbiddenName : FORBIDDEN_NAMES) { if (name.equalsIgnoreCase(forbiddenName)) { BauSystem.MESSAGE.send("WARP_NAME_RESERVED", player, name); @@ -91,24 +78,23 @@ public class WarpCommand extends SWCommand implements Disable, Enable { BauSystem.MESSAGE.send("WARP_CREATED", player, name); } - @Register + @Register(description = "WARP_HELP_TELEPORT") public void tpWarp(Player player, Warp warp) { warp.teleport(player); } - @Register("delete") - public void deleteWarp(Player player, Warp warp) { - if (!permissionCheck(player)) return; + @Register(value = "delete", description = "WARP_HELP_DELETE") + public void deleteWarp(@Guard Player player, Warp warp) { warp.delete(); BauSystem.MESSAGE.send("WARP_DELETED", player, warp.getName()); } - @Register("gui") + @Register(value = "gui", description = "WARP_HELP_GUI") public void gui(Player player) { WarpGui.openGui(player); } - @Register("list") + @Register(value = "list", description = "WARP_HELP_LIST") public void listWarps(Player player) { listWarps(player, 0); } @@ -131,7 +117,7 @@ public class WarpCommand extends SWCommand implements Disable, Enable { }); } - @Register("info") + @Register(value = "info", description = "WARP_HELP_INFO") public void warpInfo(Player player, Warp warp) { BauSystem.MESSAGE.send("COMMAND_HELP_HEAD", player, warp.getName()); BauSystem.MESSAGE.sendPrefixless("WARP_INFO_NAME", player, warp.getName()); @@ -141,13 +127,18 @@ public class WarpCommand extends SWCommand implements Disable, Enable { BauSystem.MESSAGE.sendPrefixless("WARP_GUI_DISTANCE", player, warp.getLocation().distance(player.getLocation())); } - @SuppressWarnings("BooleanMethodIsAlwaysInverted") - private boolean permissionCheck(Player player) { - if (!Permission.hasPermission(player, Permission.WORLD)) { - BauSystem.MESSAGE.send("WARP_DISALLOWED", player); - return false; - } - return true; + @ClassGuard(value = Player.class, local = true) + public GuardChecker commandGuard() { + return (commandSender, guardCheckType, strings, s) -> { + Player player = (Player) commandSender; + if (!Permission.hasPermission(player, Permission.WORLD)) { + if (guardCheckType != GuardCheckType.TAB_COMPLETE) { + BauSystem.MESSAGE.send("WARP_DISALLOWED", player); + } + return GuardResult.DENIED; + } + return GuardResult.ALLOWED; + }; } @Linked(LinkageType.COMMAND) From 18af7e5f10d91d8cbb3abd76d273460d265a5b23 Mon Sep 17 00:00:00 2001 From: zOnlyKroks Date: Mon, 27 Dec 2021 13:49:07 +0100 Subject: [PATCH 10/34] SelectCommand --- BauSystem_Main/src/BauSystem.properties | 4 ++++ .../bausystem/features/util/items/SelectBauGuiItem.java | 5 +++-- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/BauSystem_Main/src/BauSystem.properties b/BauSystem_Main/src/BauSystem.properties index e0863af4..295fd3fc 100644 --- a/BauSystem_Main/src/BauSystem.properties +++ b/BauSystem_Main/src/BauSystem.properties @@ -1061,6 +1061,10 @@ TNT_CLICK_VELOCITY_X = §7Velocity §eX§8: §e{0} TNT_CLICK_VELOCITY_Y = §7Velocity §eY§8: §e{0} TNT_CLICK_VELOCITY_Z = §7Velocity §eZ§8: §e{0} +#Select Util +CHOOSE_EXTENSION ="Extension auswählen" +CHOOSE_SELECTION ="Auswahl auswählen" + # Warp WARP_DISALLOWED = §cDu darfst hier nicht das Warp System nutzen WARP_LOC_X = §7X§8: §e{0} diff --git a/BauSystem_Main/src/de/steamwar/bausystem/features/util/items/SelectBauGuiItem.java b/BauSystem_Main/src/de/steamwar/bausystem/features/util/items/SelectBauGuiItem.java index c3fe7d4d..4bbc4d0e 100644 --- a/BauSystem_Main/src/de/steamwar/bausystem/features/util/items/SelectBauGuiItem.java +++ b/BauSystem_Main/src/de/steamwar/bausystem/features/util/items/SelectBauGuiItem.java @@ -19,6 +19,7 @@ package de.steamwar.bausystem.features.util.items; +import de.steamwar.bausystem.BauSystem; import de.steamwar.bausystem.Permission; import de.steamwar.bausystem.config.ColorConfig; import de.steamwar.bausystem.linkage.specific.BauGuiItem; @@ -51,7 +52,7 @@ public class SelectBauGuiItem extends BauGuiItem { private static void selectExtension(Player p, RegionType type) { p.closeInventory(); - SWInventory inv = new SWInventory(p, 9, "Extension auswählen"); + SWInventory inv = new SWInventory(p, 9, BauSystem.MESSAGE.parse("CHOOSE_EXTENSION", p)); inv.setItem(2, new SWItem(Material.END_STONE, ColorConfig.HIGHLIGHT + "Normal", clickType -> selectFinish(p, type, RegionExtensionType.NORMAL))); inv.setItem(6, new SWItem(Material.PISTON, ColorConfig.HIGHLIGHT + "Ausfahrmaße", clickType -> selectFinish(p, type, RegionExtensionType.EXTENSION))); inv.open(); @@ -74,7 +75,7 @@ public class SelectBauGuiItem extends BauGuiItem { public boolean click(ClickType click, Player p) { if (click == ClickType.RIGHT) { p.closeInventory(); - SWInventory inv = new SWInventory(p, 9, "Auswahl auswählen"); + SWInventory inv = new SWInventory(p, 9, BauSystem.MESSAGE.parse("CHOOSE_SELECTION", p)); inv.setItem(2, new SWItem(Material.REDSTONE_BLOCK, ColorConfig.HIGHLIGHT + "Baurahmen", clickType -> selectExtension(p, RegionType.BUILD))); inv.setItem(4, new SWItem(Material.LECTERN, ColorConfig.HIGHLIGHT + "Bauplattform", clickType -> selectFinish(p, RegionType.NORMAL, RegionExtensionType.NORMAL))); inv.setItem(6, new SWItem(Material.END_STONE, ColorConfig.HIGHLIGHT + "Testblock", clickType -> selectExtension(p, RegionType.TESTBLOCK))); From 46678aead5bd00d97a2b19d7473853a667862446 Mon Sep 17 00:00:00 2001 From: yoyosource Date: Mon, 27 Dec 2021 13:54:29 +0100 Subject: [PATCH 11/34] Update WorldEditListener Signed-off-by: yoyosource --- BauSystem_Main/src/BauSystem.properties | 3 ++- .../steamwar/bausystem/features/world/WorldEditListener.java | 3 +-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/BauSystem_Main/src/BauSystem.properties b/BauSystem_Main/src/BauSystem.properties index 9f016ae9..254682ae 100644 --- a/BauSystem_Main/src/BauSystem.properties +++ b/BauSystem_Main/src/BauSystem.properties @@ -1091,4 +1091,5 @@ WARP_MOON_COUNTDOOWN=§7Noch §e§l{0} §7Sekunden! # WORLD STOP_HELP = §8/§estop §8- §7Stoppt den Server STOP_NO_PERMS = §cDu hast keine Rechte den Server zu stoppen -STOP_MESSAGE = §eDer Server wird gestoppt \ No newline at end of file +STOP_MESSAGE = §eDer Server wird gestoppt +WORLD_EDIT_NO_PERMS = §cDu darfst hier kein WorldEdit benutzen diff --git a/BauSystem_Main/src/de/steamwar/bausystem/features/world/WorldEditListener.java b/BauSystem_Main/src/de/steamwar/bausystem/features/world/WorldEditListener.java index b234b483..07061fcb 100644 --- a/BauSystem_Main/src/de/steamwar/bausystem/features/world/WorldEditListener.java +++ b/BauSystem_Main/src/de/steamwar/bausystem/features/world/WorldEditListener.java @@ -37,9 +37,8 @@ public class WorldEditListener implements Listener { if (!isWorldEditCommand(e.getMessage().split(" ")[0])) return; Player p = e.getPlayer(); - if (!Permission.hasPermission(p, Permission.WORLDEDIT)) { - p.sendMessage(BauSystem.PREFIX + "§cDu darfst hier kein WorldEdit benutzen"); + BauSystem.MESSAGE.send("WORLD_EDIT_NO_PERMS", p); e.setCancelled(true); } } From 348ed47d196a3ed8abfd2c35d94fc0e26dcfbf1b Mon Sep 17 00:00:00 2001 From: yoyosource Date: Mon, 27 Dec 2021 13:57:54 +0100 Subject: [PATCH 12/34] Update message keys Signed-off-by: yoyosource --- BauSystem_Main/src/BauSystem.properties | 4 ++-- .../bausystem/features/util/items/SelectBauGuiItem.java | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/BauSystem_Main/src/BauSystem.properties b/BauSystem_Main/src/BauSystem.properties index 7cc57a9a..13b735f2 100644 --- a/BauSystem_Main/src/BauSystem.properties +++ b/BauSystem_Main/src/BauSystem.properties @@ -1062,8 +1062,8 @@ TNT_CLICK_VELOCITY_Y = §7Velocity §eY§8: §e{0} TNT_CLICK_VELOCITY_Z = §7Velocity §eZ§8: §e{0} #Select Util -CHOOSE_EXTENSION ="Extension auswählen" -CHOOSE_SELECTION ="Auswahl auswählen" +SELECT_GUI_CHOOSE_EXTENSION = Extension auswählen +SELECT_GUI_CHOOSE_SELECTION = Auswahl auswählen # Warp WARP_DISALLOWED = §cDu darfst hier nicht das Warp System nutzen diff --git a/BauSystem_Main/src/de/steamwar/bausystem/features/util/items/SelectBauGuiItem.java b/BauSystem_Main/src/de/steamwar/bausystem/features/util/items/SelectBauGuiItem.java index 4bbc4d0e..9430955b 100644 --- a/BauSystem_Main/src/de/steamwar/bausystem/features/util/items/SelectBauGuiItem.java +++ b/BauSystem_Main/src/de/steamwar/bausystem/features/util/items/SelectBauGuiItem.java @@ -52,7 +52,7 @@ public class SelectBauGuiItem extends BauGuiItem { private static void selectExtension(Player p, RegionType type) { p.closeInventory(); - SWInventory inv = new SWInventory(p, 9, BauSystem.MESSAGE.parse("CHOOSE_EXTENSION", p)); + SWInventory inv = new SWInventory(p, 9, BauSystem.MESSAGE.parse("SELECT_GUI_CHOOSE_EXTENSION", p)); inv.setItem(2, new SWItem(Material.END_STONE, ColorConfig.HIGHLIGHT + "Normal", clickType -> selectFinish(p, type, RegionExtensionType.NORMAL))); inv.setItem(6, new SWItem(Material.PISTON, ColorConfig.HIGHLIGHT + "Ausfahrmaße", clickType -> selectFinish(p, type, RegionExtensionType.EXTENSION))); inv.open(); @@ -75,7 +75,7 @@ public class SelectBauGuiItem extends BauGuiItem { public boolean click(ClickType click, Player p) { if (click == ClickType.RIGHT) { p.closeInventory(); - SWInventory inv = new SWInventory(p, 9, BauSystem.MESSAGE.parse("CHOOSE_SELECTION", p)); + SWInventory inv = new SWInventory(p, 9, BauSystem.MESSAGE.parse("SELECT_GUI_CHOOSE_SELECTION", p)); inv.setItem(2, new SWItem(Material.REDSTONE_BLOCK, ColorConfig.HIGHLIGHT + "Baurahmen", clickType -> selectExtension(p, RegionType.BUILD))); inv.setItem(4, new SWItem(Material.LECTERN, ColorConfig.HIGHLIGHT + "Bauplattform", clickType -> selectFinish(p, RegionType.NORMAL, RegionExtensionType.NORMAL))); inv.setItem(6, new SWItem(Material.END_STONE, ColorConfig.HIGHLIGHT + "Testblock", clickType -> selectExtension(p, RegionType.TESTBLOCK))); From f2f204ca7874e1dafdd08c0e6da7837d50cb30d1 Mon Sep 17 00:00:00 2001 From: yoyosource Date: Mon, 27 Dec 2021 13:59:50 +0100 Subject: [PATCH 13/34] Update WaterVisionCommand Signed-off-by: yoyosource --- BauSystem_Main/src/BauSystem.properties | 4 +++ .../features/util/WaterVisionCommand.java | 27 ++++++++----------- 2 files changed, 15 insertions(+), 16 deletions(-) diff --git a/BauSystem_Main/src/BauSystem.properties b/BauSystem_Main/src/BauSystem.properties index 13b735f2..642d42c5 100644 --- a/BauSystem_Main/src/BauSystem.properties +++ b/BauSystem_Main/src/BauSystem.properties @@ -1061,6 +1061,10 @@ TNT_CLICK_VELOCITY_X = §7Velocity §eX§8: §e{0} TNT_CLICK_VELOCITY_Y = §7Velocity §eY§8: §e{0} TNT_CLICK_VELOCITY_Z = §7Velocity §eZ§8: §e{0} +WATER_VISION_HELP = §8/§ewatervision §8- §7Schalte Watervision an oder aus. +WATER_VISION_DISABLE = §eWassersicht deaktiviert +WATER_VISION_ENABLE = §eWassersicht aktiviert + #Select Util SELECT_GUI_CHOOSE_EXTENSION = Extension auswählen SELECT_GUI_CHOOSE_SELECTION = Auswahl auswählen diff --git a/BauSystem_Main/src/de/steamwar/bausystem/features/util/WaterVisionCommand.java b/BauSystem_Main/src/de/steamwar/bausystem/features/util/WaterVisionCommand.java index ce1ac4bf..bef8e245 100644 --- a/BauSystem_Main/src/de/steamwar/bausystem/features/util/WaterVisionCommand.java +++ b/BauSystem_Main/src/de/steamwar/bausystem/features/util/WaterVisionCommand.java @@ -19,11 +19,11 @@ package de.steamwar.bausystem.features.util; -import de.steamwar.bausystem.SWUtils; -import de.steamwar.bausystem.config.ColorConfig; +import de.steamwar.bausystem.BauSystem; import de.steamwar.bausystem.linkage.LinkageType; import de.steamwar.bausystem.linkage.Linked; import de.steamwar.command.SWCommand; +import net.md_5.bungee.api.ChatMessageType; import org.bukkit.entity.Player; import org.bukkit.potion.PotionEffect; import org.bukkit.potion.PotionEffectType; @@ -35,19 +35,14 @@ public class WaterVisionCommand extends SWCommand { super("watervision", "wv"); } - @Register(help = true) - public void help(final Player p, final String... args) { - p.sendMessage(ColorConfig.OTHER + "/" + ColorConfig.HIGHLIGHT + "watervision " + ColorConfig.OTHER + "-" + ColorConfig.BASE + " Schalte Watervision an oder aus."); - } - - @Register + @Register(description = "WATER_VISION_HELP") public void genericCommand(Player p) { - if (p.hasPotionEffect(PotionEffectType.WATER_BREATHING)) { - p.removePotionEffect(PotionEffectType.WATER_BREATHING); - SWUtils.sendToActionbar(p, ColorConfig.HIGHLIGHT + "Wassersicht deaktiviert"); - return; - } - p.addPotionEffect(new PotionEffect(PotionEffectType.WATER_BREATHING, 1000000, 255, false, false)); - SWUtils.sendToActionbar(p, ColorConfig.HIGHLIGHT + "Wassersicht aktiviert"); - } + if (p.hasPotionEffect(PotionEffectType.WATER_BREATHING)) { + p.removePotionEffect(PotionEffectType.WATER_BREATHING); + BauSystem.MESSAGE.sendPrefixless("WATER_VISION_DISABLE", p, ChatMessageType.ACTION_BAR); + return; + } + p.addPotionEffect(new PotionEffect(PotionEffectType.WATER_BREATHING, 1000000, 255, false, false)); + BauSystem.MESSAGE.sendPrefixless("WATER_VISION_ENABLE", p, ChatMessageType.ACTION_BAR); + } } \ No newline at end of file From 63c21241b2e7c26347cc3f2acbd556b1dee4a82f Mon Sep 17 00:00:00 2001 From: zOnlyKroks Date: Mon, 27 Dec 2021 14:01:18 +0100 Subject: [PATCH 14/34] SelectBauGuiItem --- BauSystem_Main/src/BauSystem.properties | 14 +++++++++++--- .../features/util/items/SelectBauGuiItem.java | 16 ++++++++-------- 2 files changed, 19 insertions(+), 11 deletions(-) diff --git a/BauSystem_Main/src/BauSystem.properties b/BauSystem_Main/src/BauSystem.properties index ca6ca4f7..229b3da1 100644 --- a/BauSystem_Main/src/BauSystem.properties +++ b/BauSystem_Main/src/BauSystem.properties @@ -865,7 +865,7 @@ OTHER_TPS_SINGLE = §8TPS: §e{0} OTHER_WORLDSPAWN_HELP=§8/§eworldspawn §8-§e Teleportiere dich zum Spawn # DebugStick DEBUG-STICK_COMMAND_HELP=§8/§edebugstick §8-§7 Erhalte einen DebugStick -DEBUG-STICK=&eDEBUGSTICK +DEBUG-STICK_NAME=&eDEBUGSTICK # StructureVoid STRUCTURE-VOID_COMMAND_HELP=§8/§estructureVoid §8-§7 Erhalte ein StructureVoid # NightVision @@ -1062,8 +1062,16 @@ TNT_CLICK_VELOCITY_Y = §7Velocity §eY§8: §e{0} TNT_CLICK_VELOCITY_Z = §7Velocity §eZ§8: §e{0} #Select Util -CHOOSE_EXTENSION ="Extension auswählen" -CHOOSE_SELECTION ="Auswahl auswählen" +SELECT_ITEM_CHOOSE_EXTENSION ="Extension auswählen" +SELECT_ITEM_CHOOSE_SELECTION ="Auswahl auswählen" +SELECT_ITEM_NORMAL_EXTENSION ="§eNormal" +SELECT_ITEM_EXTENDED_EXTENSION="§eAusgefahren" +SELECT_ITEM_SELECT="§eSelect" +SELECT_ITEM_AUSWAHL="§7Auswahl: &7" +SELECT_ITEM_RIGHT_CLICK="&7Rechtklick zum ändern" +SELECT_ITEM_BAURAHMEN="§eBaurahmen" +SELECT_ITEM_BAUPLATTFORM="§eBauplattform" +SELECT_ITEM_TESTBLOCK="§eTestblock" # Warp WARP_DISALLOWED = §cDu darfst hier nicht das Warp System nutzen diff --git a/BauSystem_Main/src/de/steamwar/bausystem/features/util/items/SelectBauGuiItem.java b/BauSystem_Main/src/de/steamwar/bausystem/features/util/items/SelectBauGuiItem.java index 4bbc4d0e..408a9399 100644 --- a/BauSystem_Main/src/de/steamwar/bausystem/features/util/items/SelectBauGuiItem.java +++ b/BauSystem_Main/src/de/steamwar/bausystem/features/util/items/SelectBauGuiItem.java @@ -52,9 +52,9 @@ public class SelectBauGuiItem extends BauGuiItem { private static void selectExtension(Player p, RegionType type) { p.closeInventory(); - SWInventory inv = new SWInventory(p, 9, BauSystem.MESSAGE.parse("CHOOSE_EXTENSION", p)); - inv.setItem(2, new SWItem(Material.END_STONE, ColorConfig.HIGHLIGHT + "Normal", clickType -> selectFinish(p, type, RegionExtensionType.NORMAL))); - inv.setItem(6, new SWItem(Material.PISTON, ColorConfig.HIGHLIGHT + "Ausfahrmaße", clickType -> selectFinish(p, type, RegionExtensionType.EXTENSION))); + SWInventory inv = new SWInventory(p, 9, BauSystem.MESSAGE.parse("SELECT_ITEM_CHOOSE_EXTENSION", p)); + inv.setItem(2, new SWItem(Material.END_STONE, BauSystem.MESSAGE.parse("SELECT_ITEM_NORMAL_EXTENSION", p), clickType -> selectFinish(p, type, RegionExtensionType.NORMAL))); + inv.setItem(6, new SWItem(Material.PISTON, BauSystem.MESSAGE.parse("SELECT_ITEM_EXTENDED_EXTENSION", p), clickType -> selectFinish(p, type, RegionExtensionType.EXTENSION))); inv.open(); } @@ -67,7 +67,7 @@ public class SelectBauGuiItem extends BauGuiItem { @Override public ItemStack getItem(Player player) { LastSelect last = LAST_SELECT_MAP.getOrDefault(player, new LastSelect(RegionType.BUILD, RegionExtensionType.NORMAL)); - return new SWItem(Material.SCAFFOLDING, ColorConfig.HIGHLIGHT + "Select", Arrays.asList(ColorConfig.BASE + "Auswahl: " + ColorConfig.HIGHLIGHT + last.toString(), ColorConfig.BASE + "Rechtklick zum ändern"), false, clickType -> { + return new SWItem(Material.SCAFFOLDING, BauSystem.MESSAGE.parse("SELECT_ITEM_EXTENDED_EXTENSION",player), Arrays.asList(BauSystem.MESSAGE.parse("EXTENDED_EXTENSION", player) + last.toString(), BauSystem.MESSAGE.parse("RIGHT_CLICK", player)), false, clickType -> { }).getItemStack(); } @@ -75,10 +75,10 @@ public class SelectBauGuiItem extends BauGuiItem { public boolean click(ClickType click, Player p) { if (click == ClickType.RIGHT) { p.closeInventory(); - SWInventory inv = new SWInventory(p, 9, BauSystem.MESSAGE.parse("CHOOSE_SELECTION", p)); - inv.setItem(2, new SWItem(Material.REDSTONE_BLOCK, ColorConfig.HIGHLIGHT + "Baurahmen", clickType -> selectExtension(p, RegionType.BUILD))); - inv.setItem(4, new SWItem(Material.LECTERN, ColorConfig.HIGHLIGHT + "Bauplattform", clickType -> selectFinish(p, RegionType.NORMAL, RegionExtensionType.NORMAL))); - inv.setItem(6, new SWItem(Material.END_STONE, ColorConfig.HIGHLIGHT + "Testblock", clickType -> selectExtension(p, RegionType.TESTBLOCK))); + SWInventory inv = new SWInventory(p, 9, BauSystem.MESSAGE.parse("SELECT_ITEM_CHOOSE_SELECTION", p)); + inv.setItem(2, new SWItem(Material.REDSTONE_BLOCK, BauSystem.MESSAGE.parse("SELECT_ITEM_BAURAHMEN", p), clickType -> selectExtension(p, RegionType.BUILD))); + inv.setItem(4, new SWItem(Material.LECTERN, BauSystem.MESSAGE.parse("SELECT_ITEM_BAUPLATTFORM", p), clickType -> selectFinish(p, RegionType.NORMAL, RegionExtensionType.NORMAL))); + inv.setItem(6, new SWItem(Material.END_STONE, BauSystem.MESSAGE.parse("SELECT_ITEM_TESTBLOCK", p), clickType -> selectExtension(p, RegionType.TESTBLOCK))); inv.open(); } else { p.closeInventory(); From bb35ddba569cd96a6455d5bc22ca4ca2a52da8a5 Mon Sep 17 00:00:00 2001 From: yoyosource Date: Mon, 27 Dec 2021 14:01:20 +0100 Subject: [PATCH 15/34] Update StructureVoidCommand Signed-off-by: yoyosource --- BauSystem_Main/src/BauSystem.properties | 2 +- .../features/util/StructureVoidCommand.java | 12 +----------- 2 files changed, 2 insertions(+), 12 deletions(-) diff --git a/BauSystem_Main/src/BauSystem.properties b/BauSystem_Main/src/BauSystem.properties index 642d42c5..4c6a2431 100644 --- a/BauSystem_Main/src/BauSystem.properties +++ b/BauSystem_Main/src/BauSystem.properties @@ -867,7 +867,7 @@ OTHER_WORLDSPAWN_HELP=§8/§eworldspawn §8-§e Teleportiere dich zum Spawn DEBUG-STICK_COMMAND_HELP=§8/§edebugstick §8-§7 Erhalte einen DebugStick DEBUG-STICK=&eDEBUGSTICK # StructureVoid -STRUCTURE-VOID_COMMAND_HELP=§8/§estructureVoid §8-§7 Erhalte ein StructureVoid +STRUCTURE_VOID_COMMAND_HELP=§8/§estructureVoid §8-§7 Erhalte ein StructureVoid # NightVision NIGHT-VISION_COMMAND_HELP=§8/§enightvision §8-§7 Schalte Nightvision an oder aus. NIGHT-VISION_OFF=§eNightvision deaktiviert diff --git a/BauSystem_Main/src/de/steamwar/bausystem/features/util/StructureVoidCommand.java b/BauSystem_Main/src/de/steamwar/bausystem/features/util/StructureVoidCommand.java index ac642a55..4146329c 100644 --- a/BauSystem_Main/src/de/steamwar/bausystem/features/util/StructureVoidCommand.java +++ b/BauSystem_Main/src/de/steamwar/bausystem/features/util/StructureVoidCommand.java @@ -19,7 +19,6 @@ package de.steamwar.bausystem.features.util; -import de.steamwar.bausystem.BauSystem; import de.steamwar.bausystem.SWUtils; import de.steamwar.bausystem.linkage.LinkageType; import de.steamwar.bausystem.linkage.Linked; @@ -33,18 +32,9 @@ public class StructureVoidCommand extends SWCommand { public StructureVoidCommand() { super("structureVoid", "structure", "void", "structurevoid"); - setMessage(BauSystem.MESSAGE); } - /* - @Register(help = true) - public void genericHelp(Player p, String... args) { - BauSystem.MESSAGE.send("COMMAND_HELP_HEAD", p, "structureVoid"); - BauSystem.MESSAGE.send("STRUCTURE-VOID_COMMAND_HELP", p); - } - */ - - @Register(description = "STRUCTURE-VOID_COMMAND_HELP") + @Register(description = "STRUCTURE_VOID_COMMAND_HELP") public void genericCommand(Player p) { SWUtils.giveItemToPlayer(p, new ItemStack(Material.STRUCTURE_VOID, 1)); } From c5e6c775c3222eddcf23be3413575528431bc610 Mon Sep 17 00:00:00 2001 From: zOnlyKroks Date: Mon, 27 Dec 2021 14:01:44 +0100 Subject: [PATCH 16/34] SelectBauGuiItem --- BauSystem_Main/src/BauSystem.properties | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/BauSystem_Main/src/BauSystem.properties b/BauSystem_Main/src/BauSystem.properties index 229b3da1..9bc716f2 100644 --- a/BauSystem_Main/src/BauSystem.properties +++ b/BauSystem_Main/src/BauSystem.properties @@ -865,7 +865,7 @@ OTHER_TPS_SINGLE = §8TPS: §e{0} OTHER_WORLDSPAWN_HELP=§8/§eworldspawn §8-§e Teleportiere dich zum Spawn # DebugStick DEBUG-STICK_COMMAND_HELP=§8/§edebugstick §8-§7 Erhalte einen DebugStick -DEBUG-STICK_NAME=&eDEBUGSTICK +DEBUG-STICK_NAME=§eDEBUGSTICK # StructureVoid STRUCTURE-VOID_COMMAND_HELP=§8/§estructureVoid §8-§7 Erhalte ein StructureVoid # NightVision From b478bc23619ab28f7f4828163643ee0a40c691c6 Mon Sep 17 00:00:00 2001 From: zOnlyKroks Date: Mon, 27 Dec 2021 14:03:59 +0100 Subject: [PATCH 17/34] SkullBauGuiItem --- BauSystem_Main/src/BauSystem.properties | 2 ++ .../bausystem/features/util/items/SkullBauGuiItem.java | 3 ++- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/BauSystem_Main/src/BauSystem.properties b/BauSystem_Main/src/BauSystem.properties index 9bc716f2..5ed08352 100644 --- a/BauSystem_Main/src/BauSystem.properties +++ b/BauSystem_Main/src/BauSystem.properties @@ -866,6 +866,8 @@ OTHER_WORLDSPAWN_HELP=§8/§eworldspawn §8-§e Teleportiere dich zum Spawn # DebugStick DEBUG-STICK_COMMAND_HELP=§8/§edebugstick §8-§7 Erhalte einen DebugStick DEBUG-STICK_NAME=§eDEBUGSTICK +#Skull Gui +ANVIL-INV_NAME="Spieler namen" # StructureVoid STRUCTURE-VOID_COMMAND_HELP=§8/§estructureVoid §8-§7 Erhalte ein StructureVoid # NightVision diff --git a/BauSystem_Main/src/de/steamwar/bausystem/features/util/items/SkullBauGuiItem.java b/BauSystem_Main/src/de/steamwar/bausystem/features/util/items/SkullBauGuiItem.java index 29175198..228a4a7b 100644 --- a/BauSystem_Main/src/de/steamwar/bausystem/features/util/items/SkullBauGuiItem.java +++ b/BauSystem_Main/src/de/steamwar/bausystem/features/util/items/SkullBauGuiItem.java @@ -19,6 +19,7 @@ package de.steamwar.bausystem.features.util.items; +import de.steamwar.bausystem.BauSystem; import de.steamwar.bausystem.Permission; import de.steamwar.bausystem.config.ColorConfig; import de.steamwar.bausystem.linkage.specific.BauGuiItem; @@ -46,7 +47,7 @@ public class SkullBauGuiItem extends BauGuiItem { @Override public boolean click(ClickType click, Player p) { p.closeInventory(); - SWAnvilInv inv = new SWAnvilInv(p, "Spieler namen"); + SWAnvilInv inv = new SWAnvilInv(p, BauSystem.MESSAGE.parse("ANVIL-INV_NAME",p)); inv.setItem(Material.NAME_TAG); inv.setCallback(s -> p.performCommand("skull " + s)); inv.open(); From 0162ee2b6a0f195e186134add8458549e8b06dfd Mon Sep 17 00:00:00 2001 From: yoyosource Date: Mon, 27 Dec 2021 14:06:34 +0100 Subject: [PATCH 18/34] Update SpeedCommand Signed-off-by: yoyosource --- BauSystem_Main/src/BauSystem.properties | 5 +++++ .../bausystem/features/util/SpeedCommand.java | 11 +++++------ 2 files changed, 10 insertions(+), 6 deletions(-) diff --git a/BauSystem_Main/src/BauSystem.properties b/BauSystem_Main/src/BauSystem.properties index 4c6a2431..63ed7487 100644 --- a/BauSystem_Main/src/BauSystem.properties +++ b/BauSystem_Main/src/BauSystem.properties @@ -1051,6 +1051,11 @@ PANZERN_PROGRESS = §e{0} §7Blöcke übrig, §e{1} §7Blöcke pro Sekunde, §e{ PANZERN_DONE = §aZuende gepanzert # UTILS +SPEED_HELP = §8/§espeed §8[§71§8-§710§8|§edefault§8] §8-§7 Setzte deine Flug- und Laufgeschindigkeit. +SPEED_CURRENT = §7Aktuelle geschwindigkeit§8: §e{0} +SPEED_TOO_SMALL = §c{0} ist zu klein +SPEED_TOO_HIGH = §c{0} ist zu hoch + TNT_CLICK_HEADER = §8---=== §eTNT §8===--- TNT_CLICK_ORDER = §eEntity Order§8: §e{0} TNT_CLICK_FUSE_TIME = §eFuseTime§8: §e{0} diff --git a/BauSystem_Main/src/de/steamwar/bausystem/features/util/SpeedCommand.java b/BauSystem_Main/src/de/steamwar/bausystem/features/util/SpeedCommand.java index d2d54a4a..a2eef6df 100644 --- a/BauSystem_Main/src/de/steamwar/bausystem/features/util/SpeedCommand.java +++ b/BauSystem_Main/src/de/steamwar/bausystem/features/util/SpeedCommand.java @@ -20,7 +20,6 @@ package de.steamwar.bausystem.features.util; import de.steamwar.bausystem.BauSystem; -import de.steamwar.bausystem.config.ColorConfig; import de.steamwar.bausystem.linkage.LinkageType; import de.steamwar.bausystem.linkage.Linked; import de.steamwar.command.SWCommand; @@ -35,21 +34,21 @@ public class SpeedCommand extends SWCommand { @Register(help = true) public void genericHelp(Player p, String... args) { - p.sendMessage(ColorConfig.OTHER + "/" + ColorConfig.HIGHLIGHT + "speed " + ColorConfig.OTHER + "[" + ColorConfig.HIGHLIGHT + "1" + ColorConfig.OTHER + "-" + ColorConfig.HIGHLIGHT + "10" + ColorConfig.OTHER + "] - " + ColorConfig.BASE + "Setzte deine Flug- und Laufgeschindigkeit."); - p.sendMessage(BauSystem.PREFIX + "Aktuelle geschwindigkeit: " + ColorConfig.HIGHLIGHT + (p.getFlySpeed() * 10F)); + BauSystem.MESSAGE.sendPrefixless("SPEED_HELP", p); + BauSystem.MESSAGE.send("SPEED_CURRENT", p, (p.getFlySpeed() * 10F)); } @Register public void speedCommand(Player p, float speed) { speed = speed / 10F; if (speed < -1F) { - p.sendMessage(BauSystem.PREFIX + ColorConfig.DISABLE + speed + " ist zu klein"); + BauSystem.MESSAGE.send("SPEED_TOO_SMALL", p, speed); } else if (speed > 1F) { - p.sendMessage(BauSystem.PREFIX + ColorConfig.DISABLE + speed + " ist zu hoch"); + BauSystem.MESSAGE.send("SPEED_TOO_HIGH", p, speed); } else { p.setFlySpeed(speed); p.setWalkSpeed(Math.min(speed + 0.1F, 1F)); - p.sendMessage(BauSystem.PREFIX + "Aktuelle geschwindigkeit: " + ColorConfig.HIGHLIGHT + (p.getFlySpeed() * 10F)); + BauSystem.MESSAGE.send("SPEED_CURRENT", p, (p.getFlySpeed() * 10F)); } } From 3582d87899f53b418fd071bab6924f95698f1b7d Mon Sep 17 00:00:00 2001 From: yoyosource Date: Mon, 27 Dec 2021 14:07:59 +0100 Subject: [PATCH 19/34] Remove " from BauSystem.properties Signed-off-by: yoyosource --- BauSystem_Main/src/BauSystem.properties | 21 ++++++++++----------- 1 file changed, 10 insertions(+), 11 deletions(-) diff --git a/BauSystem_Main/src/BauSystem.properties b/BauSystem_Main/src/BauSystem.properties index bee34ed2..69a106c4 100644 --- a/BauSystem_Main/src/BauSystem.properties +++ b/BauSystem_Main/src/BauSystem.properties @@ -1068,17 +1068,16 @@ TNT_CLICK_VELOCITY_X = §7Velocity §eX§8: §e{0} TNT_CLICK_VELOCITY_Y = §7Velocity §eY§8: §e{0} TNT_CLICK_VELOCITY_Z = §7Velocity §eZ§8: §e{0} -#Select Util -SELECT_ITEM_CHOOSE_EXTENSION ="Extension auswählen" -SELECT_ITEM_CHOOSE_SELECTION ="Auswahl auswählen" -SELECT_ITEM_NORMAL_EXTENSION ="§eNormal" -SELECT_ITEM_EXTENDED_EXTENSION="§eAusgefahren" -SELECT_ITEM_SELECT="§eSelect" -SELECT_ITEM_AUSWAHL="§7Auswahl: &7" -SELECT_ITEM_RIGHT_CLICK="&7Rechtklick zum ändern" -SELECT_ITEM_BAURAHMEN="§eBaurahmen" -SELECT_ITEM_BAUPLATTFORM="§eBauplattform" -SELECT_ITEM_TESTBLOCK="§eTestblock" +SELECT_ITEM_CHOOSE_EXTENSION = Extension auswählen +SELECT_ITEM_CHOOSE_SELECTION = Auswahl auswählen +SELECT_ITEM_NORMAL_EXTENSION = §eNormal +SELECT_ITEM_EXTENDED_EXTENSION= §eAusgefahren +SELECT_ITEM_SELECT= §eSelect +SELECT_ITEM_AUSWAHL= §7Auswahl: &7 +SELECT_ITEM_RIGHT_CLICK=&7Rechtklick zum ändern +SELECT_ITEM_BAURAHMEN=§eBaurahmen +SELECT_ITEM_BAUPLATTFORM=§eBauplattform +SELECT_ITEM_TESTBLOCK=§eTestblock # Warp WARP_DISALLOWED = §cDu darfst hier nicht das Warp System nutzen From 7cf65a204deb2d9b9c1de8178241b50abf88c2f7 Mon Sep 17 00:00:00 2001 From: yoyosource Date: Mon, 27 Dec 2021 14:08:20 +0100 Subject: [PATCH 20/34] =?UTF-8?q?Replace=20&=20to=20=C2=A7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: yoyosource --- BauSystem_Main/src/BauSystem.properties | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/BauSystem_Main/src/BauSystem.properties b/BauSystem_Main/src/BauSystem.properties index 69a106c4..35e540f0 100644 --- a/BauSystem_Main/src/BauSystem.properties +++ b/BauSystem_Main/src/BauSystem.properties @@ -1073,8 +1073,8 @@ SELECT_ITEM_CHOOSE_SELECTION = Auswahl auswählen SELECT_ITEM_NORMAL_EXTENSION = §eNormal SELECT_ITEM_EXTENDED_EXTENSION= §eAusgefahren SELECT_ITEM_SELECT= §eSelect -SELECT_ITEM_AUSWAHL= §7Auswahl: &7 -SELECT_ITEM_RIGHT_CLICK=&7Rechtklick zum ändern +SELECT_ITEM_AUSWAHL= §7Auswahl: §7 +SELECT_ITEM_RIGHT_CLICK=§7Rechtklick zum ändern SELECT_ITEM_BAURAHMEN=§eBaurahmen SELECT_ITEM_BAUPLATTFORM=§eBauplattform SELECT_ITEM_TESTBLOCK=§eTestblock From 3fa36c3442a7cdfab6d9cb9bfdb0271925b98364 Mon Sep 17 00:00:00 2001 From: yoyosource Date: Mon, 27 Dec 2021 14:12:02 +0100 Subject: [PATCH 21/34] Update SkullCommand Signed-off-by: yoyosource --- BauSystem_Main/src/BauSystem.properties | 3 ++ .../bausystem/features/util/SkullCommand.java | 34 ++++++++++++++----- 2 files changed, 28 insertions(+), 9 deletions(-) diff --git a/BauSystem_Main/src/BauSystem.properties b/BauSystem_Main/src/BauSystem.properties index 35e540f0..4ad139fb 100644 --- a/BauSystem_Main/src/BauSystem.properties +++ b/BauSystem_Main/src/BauSystem.properties @@ -1053,6 +1053,9 @@ PANZERN_PROGRESS = §e{0} §7Blöcke übrig, §e{1} §7Blöcke pro Sekunde, §e{ PANZERN_DONE = §aZuende gepanzert # UTILS +SKULL_HELP = §8/§eskull §8[§eSpieler§8] §8-§7 Gibt einen SpielerKopf +SKULL_ITEM = §e{0}§8s Kopf + SPEED_HELP = §8/§espeed §8[§71§8-§710§8|§edefault§8] §8-§7 Setzte deine Flug- und Laufgeschindigkeit. SPEED_CURRENT = §7Aktuelle geschwindigkeit§8: §e{0} SPEED_TOO_SMALL = §c{0} ist zu klein diff --git a/BauSystem_Main/src/de/steamwar/bausystem/features/util/SkullCommand.java b/BauSystem_Main/src/de/steamwar/bausystem/features/util/SkullCommand.java index 3cbbebfb..9fb358ca 100644 --- a/BauSystem_Main/src/de/steamwar/bausystem/features/util/SkullCommand.java +++ b/BauSystem_Main/src/de/steamwar/bausystem/features/util/SkullCommand.java @@ -19,16 +19,22 @@ package de.steamwar.bausystem.features.util; +import de.steamwar.bausystem.BauSystem; import de.steamwar.bausystem.SWUtils; -import de.steamwar.bausystem.config.ColorConfig; import de.steamwar.bausystem.linkage.LinkageType; import de.steamwar.bausystem.linkage.Linked; import de.steamwar.command.SWCommand; +import de.steamwar.command.TypeMapper; import de.steamwar.inventory.SWItem; +import org.bukkit.Bukkit; +import org.bukkit.command.CommandSender; import org.bukkit.entity.Player; import org.bukkit.inventory.ItemStack; import org.bukkit.inventory.meta.SkullMeta; +import java.util.List; +import java.util.stream.Collectors; + @Linked(LinkageType.COMMAND) public class SkullCommand extends SWCommand { @@ -36,18 +42,28 @@ public class SkullCommand extends SWCommand { super("skull", "head"); } - @Register(help = true) - public void genericHelp(Player p, String... args) { - p.sendMessage(ColorConfig.OTHER + "/" + ColorConfig.HIGHLIGHT + "skull " + ColorConfig.OTHER + "[" + ColorConfig.HIGHLIGHT + "Spieler" + ColorConfig.OTHER + "] - " + ColorConfig.BASE + "Gibt einen SpielerKopf"); - } - - @Register - public void giveCommand(Player p, String skull) { + @Register(description = "SKULL_HELP") + public void giveCommand(Player p, @Mapper("player") String skull) { ItemStack is = SWItem.getPlayerSkull(skull).getItemStack(); SkullMeta sm = (SkullMeta) is.getItemMeta(); assert sm != null; - sm.setDisplayName(ColorConfig.HIGHLIGHT + skull + ColorConfig.OTHER + "s Kopf"); + sm.setDisplayName(BauSystem.MESSAGE.parse("SKULL_ITEM", p, skull)); is.setItemMeta(sm); SWUtils.giveItemToPlayer(p, is); } + + @Mapper(value = "player", local = true) + public TypeMapper typeMapper() { + return new TypeMapper() { + @Override + public String map(CommandSender commandSender, String[] previousArguments, String s) { + return s; + } + + @Override + public List tabCompletes(CommandSender commandSender, String[] strings, String s) { + return Bukkit.getOnlinePlayers().stream().map(Player::getName).collect(Collectors.toList()); + } + }; + } } \ No newline at end of file From 40c1e13435b5cb26fdc7a9161bb477813a3c021c Mon Sep 17 00:00:00 2001 From: yoyosource Date: Mon, 27 Dec 2021 14:23:07 +0100 Subject: [PATCH 22/34] Update TraceCommand Signed-off-by: yoyosource --- BauSystem_Main/src/BauSystem.properties | 1 + .../features/tracer/TraceCommand.java | 123 ++++++------------ 2 files changed, 40 insertions(+), 84 deletions(-) diff --git a/BauSystem_Main/src/BauSystem.properties b/BauSystem_Main/src/BauSystem.properties index 4ad139fb..ee2cac0f 100644 --- a/BauSystem_Main/src/BauSystem.properties +++ b/BauSystem_Main/src/BauSystem.properties @@ -666,6 +666,7 @@ TRACE_MESSAGE_HIDE = §cAlle TNT-Positionen ausgeblendet TRACE_MESSAGE_DISALLOWED = §cDu darfst hier nicht den TNT-Tracer nutzen TRACE_COMMAND_HELP_START = §8/§etrace start §8- §7Startet die Aufnahme aller TNT-Positionen +TRACE_COMMAND_HELP_SINGLE = §8/§etrace single §8- §7Startet eine einzelne Aufnahme aller TNT-Positionen TRACE_COMMAND_HELP_STOP = §8/§etrace stop §8- §7Stoppt den TNT-Tracer TRACE_COMMAND_HELP_AUTO = §8/§etrace toggleauto §8- §7Automatischer Aufnahmenstart TRACE_COMMAND_HELP_SHOW_GUI = §8/§etrace show gui §8- §7Zeigt die Trace show gui diff --git a/BauSystem_Main/src/de/steamwar/bausystem/features/tracer/TraceCommand.java b/BauSystem_Main/src/de/steamwar/bausystem/features/tracer/TraceCommand.java index 882d300e..d627af28 100644 --- a/BauSystem_Main/src/de/steamwar/bausystem/features/tracer/TraceCommand.java +++ b/BauSystem_Main/src/de/steamwar/bausystem/features/tracer/TraceCommand.java @@ -34,8 +34,7 @@ import de.steamwar.bausystem.linkage.LinkageType; import de.steamwar.bausystem.linkage.Linked; import de.steamwar.bausystem.shared.ShowMode; import de.steamwar.bausystem.utils.ListChatView; -import de.steamwar.command.SWCommand; -import de.steamwar.command.TypeMapper; +import de.steamwar.command.*; import lombok.AllArgsConstructor; import net.md_5.bungee.api.chat.ClickEvent; import net.md_5.bungee.api.chat.ComponentBuilder; @@ -46,7 +45,6 @@ import org.bukkit.entity.Player; import java.util.*; import java.util.function.BiFunction; -import java.util.function.Function; import java.util.function.Supplier; import java.util.stream.Collectors; @@ -105,35 +103,14 @@ public class TraceCommand extends SWCommand { }; } - @Register(help = true) - public void genericHelp(Player p, String... args) { - BauSystem.MESSAGE.sendPrefixless("TRACE_COMMAND_HELP_START", p); - BauSystem.MESSAGE.sendPrefixless("TRACE_COMMAND_HELP_STOP", p); - BauSystem.MESSAGE.sendPrefixless("TRACE_COMMAND_HELP_AUTO", p); - BauSystem.MESSAGE.sendPrefixless("TRACE_COMMAND_HELP_SHOW_GUI", p); - BauSystem.MESSAGE.sendPrefixless("TRACE_COMMAND_HELP_SHOW", p); - BauSystem.MESSAGE.sendPrefixless("TRACE_COMMAND_HELP_HIDE", p); - BauSystem.MESSAGE.sendPrefixless("TRACE_COMMAND_HELP_DELETE", p); - BauSystem.MESSAGE.sendPrefixless("TRACE_COMMAND_HELP_LIST", p); - BauSystem.MESSAGE.sendPrefixless("TRACE_COMMAND_HELP_GUI", p); - } - - @Register({"gui"}) - public void guiCommand(Player p) { - if (!permissionCheck(p)) return; + @Register(value = {"gui"}, description = "TRACE_COMMAND_HELP_GUI") + public void guiCommand(@Guard Player p) { TraceGui.openGui(p); } - @Register({"record", "list"}) - @Register({"list"}) - public void listCommand(Player p) { - listCommand(p, 0); - } - - @Register(value = {"record", "list"}, noTabComplete = true) - @Register(value = {"list"}, noTabComplete = true) - public void listCommand(Player player, int page) { - if (!permissionCheck(player)) return; + @Register(value = {"record", "list"}) + @Register(value = {"list"}, description = "TRACE_COMMAND_HELP_LIST") + public void listCommand(@Guard Player player, @OptionalValue("0") int page) { ListChatView.chatView(player, StoredRecords.getRecords(), page, record -> { TextComponent component = new TextComponent(); component.setText(BauSystem.MESSAGE.parse("TRACE_RECORD_LIST_ELEMENT", player, record.size())); @@ -156,20 +133,13 @@ public class TraceCommand extends SWCommand { } @Register(value = {"record", "delete"}, noTabComplete = true) - public void recordDelete(Player p, int id) { - if (!permissionCheck(p)) return; + public void recordDelete(@Guard Player p, int id) { StoredRecords.remove(id); BauSystem.MESSAGE.send("TRACE_RECORD_DELETE", p); } @Register(value = "record", noTabComplete = true) - public void recordList(Player p, int record) { - recordList(p, record, 0); - } - - @Register(value = "record", noTabComplete = true) - public void recordList(Player player, int recordID, int page) { - if (!permissionCheck(player)) return; + public void recordList(@Guard Player player, int recordID, @OptionalValue("0") int page) { Record traceRecord = StoredRecords.get(recordID); if (traceRecord == null) { BauSystem.MESSAGE.send("TRACE_RECORD_NOT_FOUND", player); @@ -197,8 +167,7 @@ public class TraceCommand extends SWCommand { } @Register(value = {"record", "tnt", "delete"}, noTabComplete = true) - public void deleteRecordTNT(Player player, int recordID, int tntID) { - if (!permissionCheck(player)) return; + public void deleteRecordTNT(@Guard Player player, int recordID, int tntID) { Record record = StoredRecords.get(recordID); if (record == null) { BauSystem.MESSAGE.send("TRACE_RECORD_NOT_FOUND", player); @@ -209,13 +178,7 @@ public class TraceCommand extends SWCommand { } @Register(value = "record", noTabComplete = true) - public void recordTNTPositions(Player player, int recordID, @StaticValue("tnt") String tnt, int tntID) { - recordTNTPositions(player, recordID, tnt, tntID, 0); - } - - @Register(value = "record", noTabComplete = true) - public void recordTNTPositions(Player player, int recordID, @StaticValue("tnt") String tnt, int tntID, int page) { - if (!permissionCheck(player)) return; + public void recordTNTPositions(@Guard Player player, int recordID, @StaticValue("tnt") String tnt, int tntID, @OptionalValue("0") int page) { Record record = StoredRecords.get(recordID); if (record == null) { BauSystem.MESSAGE.send("TRACE_RECORD_NOT_FOUND", player); @@ -242,8 +205,7 @@ public class TraceCommand extends SWCommand { } @Register(value = "record", noTabComplete = true) - public void recordTNTPositions(Player player, int recordID, @StaticValue("tnt") String tnt, int tntID, @StaticValue("fuse") String fuse, int fuseTicks) { - if (!permissionCheck(player)) return; + public void recordTNTPositions(@Guard Player player, int recordID, @StaticValue("tnt") String tnt, int tntID, @StaticValue("fuse") String fuse, int fuseTicks) { Record record = StoredRecords.get(recordID); if (record == null) { BauSystem.MESSAGE.send("TRACE_RECORD_NOT_FOUND", player); @@ -266,50 +228,40 @@ public class TraceCommand extends SWCommand { BauSystem.MESSAGE.sendPrefixless("TRACE_CHAT_POSITION_EXPLODED", player, tntPosition.isExploded()); } - @Register({"start"}) - public void startCommand(Player p) { - if (!permissionCheck(p)) return; + @Register(value = {"start"}, description = "TRACE_COMMAND_HELP_START") + public void startCommand(@Guard Player p) { RecordStateMachine.commandStart(); BauSystem.MESSAGE.send("TRACE_MESSAGE_START", p); } - @Register({"single"}) - public void singleCommand(Player p) { - if (!permissionCheck(p)) return; + @Register(value = {"single"}, description = "TRACE_COMMAND_HELP_SINGLE") + public void singleCommand(@Guard Player p) { RecordStateMachine.commandSingle(); BauSystem.MESSAGE.send("TRACE_MESSAGE_SINGLE", p); } - @Register({"stop"}) - public void stopCommand(Player p) { - if (!permissionCheck(p)) return; + @Register(value = {"stop"}, description = "TRACE_COMMAND_HELP_STOP") + public void stopCommand(@Guard Player p) { RecordStateMachine.commandStop(); BauSystem.MESSAGE.send("TRACE_MESSAGE_STOP", p); } - @Register({"auto"}) + @Register(value = {"auto"}, description = "TRACE_COMMAND_HELP_AUTO") @Register({"toggleauto"}) - public void autoCommand(Player p) { - if (!permissionCheck(p)) return; + public void autoCommand(@Guard Player p) { RecordStateMachine.commandAuto(); BauSystem.MESSAGE.send(RecordStateMachine.getRecordStatus().getAutoMessage(), p); } + @Register(value = {"delete"}, description = "TRACE_COMMAND_HELP_DELETE") @Register({"clear"}) - public void clearCommand(Player p) { - deleteCommand(p); - } - - @Register({"delete"}) - public void deleteCommand(Player p) { - if (!permissionCheck(p)) return; + public void deleteCommand(@Guard Player p) { StoredRecords.clear(); BauSystem.MESSAGE.send("TRACE_MESSAGE_DELETE", p); } - @Register({"show"}) - public void showCommand(Player p, @OptionalValue("entity") ShowModeType showModeType, ShowModeParameterType... showModeParameterTypes) { - if (!permissionCheck(p)) return; + @Register(value = {"show"}, description = "TRACE_COMMAND_HELP_SHOW") + public void showCommand(@Guard Player p, @OptionalValue("entity") ShowModeType showModeType, ShowModeParameterType... showModeParameterTypes) { ShowModeParameter showModeParameter = new ShowModeParameter(); for (ShowModeParameterType showModeParameterType : showModeParameterTypes) { showModeParameterType.getShowModeParameterConsumer().accept(showModeParameter); @@ -329,25 +281,28 @@ public class TraceCommand extends SWCommand { private ShowModeParameterType[] removedTypes; } - @Register({"show", "gui"}) - public void showGuiCommand(Player p) { - if (!permissionCheck(p)) return; + @Register(value = {"show", "gui"}, description = "TRACE_COMMAND_HELP_SHOW_GUI") + public void showGuiCommand(@Guard Player p) { TraceShowGui.openGui(p); } - @Register({"hide"}) - public void hideCommand(Player p) { - if (!permissionCheck(p)) return; + @Register(value = {"hide"}, description = "TRACE_COMMAND_HELP_HIDE") + public void hideCommand(@Guard Player p) { TraceShowManager.hide(p); BauSystem.MESSAGE.send("TRACE_MESSAGE_HIDE", p); } - - private boolean permissionCheck(Player player) { - if (!Permission.hasPermission(player, Permission.WORLD)) { - BauSystem.MESSAGE.send("TRACE_MESSAGE_DISALLOWED", player); - return false; - } - return true; + @ClassGuard(value = Player.class, local = true) + public GuardChecker guardChecker() { + return (commandSender, guardCheckType, strings, s) -> { + Player player = (Player) commandSender; + if (Permission.hasPermission(player, Permission.WORLD)) { + return GuardResult.ALLOWED; + } + if (guardCheckType != GuardCheckType.TAB_COMPLETE) { + BauSystem.MESSAGE.send("TRACE_MESSAGE_DISALLOWED", player); + } + return GuardResult.DENIED; + }; } } From 7dbb5f4de84716126a7836f073853af93660c662 Mon Sep 17 00:00:00 2001 From: zOnlyKroks Date: Mon, 27 Dec 2021 15:46:21 +0100 Subject: [PATCH 23/34] Anvil Item --- BauSystem_Main/src/BauSystem.properties | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/BauSystem_Main/src/BauSystem.properties b/BauSystem_Main/src/BauSystem.properties index ee2cac0f..724a2c45 100644 --- a/BauSystem_Main/src/BauSystem.properties +++ b/BauSystem_Main/src/BauSystem.properties @@ -868,7 +868,7 @@ OTHER_WORLDSPAWN_HELP=§8/§eworldspawn §8-§e Teleportiere dich zum Spawn DEBUG-STICK_COMMAND_HELP=§8/§edebugstick §8-§7 Erhalte einen DebugStick DEBUG-STICK_NAME=§eDEBUGSTICK #Skull Gui -ANVIL-INV_NAME="Spieler namen" +ANVIL-INV_NAME=Spieler name" # StructureVoid STRUCTURE-VOID_COMMAND_HELP=§8/§estructureVoid §8-§7 Erhalte ein StructureVoid # NightVision From 851f9411ebb3cbac2e2e6cf07ce425e56a4c2624 Mon Sep 17 00:00:00 2001 From: zOnlyKroks Date: Mon, 27 Dec 2021 15:50:14 +0100 Subject: [PATCH 24/34] SpeedBauGuiItem --- BauSystem_Main/src/BauSystem.properties | 3 +++ .../bausystem/features/util/items/SpeedBauGuiItem.java | 5 +++-- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/BauSystem_Main/src/BauSystem.properties b/BauSystem_Main/src/BauSystem.properties index 724a2c45..d7558f65 100644 --- a/BauSystem_Main/src/BauSystem.properties +++ b/BauSystem_Main/src/BauSystem.properties @@ -1061,6 +1061,9 @@ SPEED_HELP = §8/§espeed §8[§71§8-§710§8|§edefault§8] §8-§7 Setzte dei SPEED_CURRENT = §7Aktuelle geschwindigkeit§8: §e{0} SPEED_TOO_SMALL = §c{0} ist zu klein SPEED_TOO_HIGH = §c{0} ist zu hoch +SPEED_ITEM = §eGeschwindigkeit +SPEED_ITEM_LORE = §7Aktuell: §e +SPEED_TAB_NAME = Geschwindigkeit eingeben TNT_CLICK_HEADER = §8---=== §eTNT §8===--- TNT_CLICK_ORDER = §eEntity Order§8: §e{0} diff --git a/BauSystem_Main/src/de/steamwar/bausystem/features/util/items/SpeedBauGuiItem.java b/BauSystem_Main/src/de/steamwar/bausystem/features/util/items/SpeedBauGuiItem.java index eb3c79e8..51e2e8f0 100644 --- a/BauSystem_Main/src/de/steamwar/bausystem/features/util/items/SpeedBauGuiItem.java +++ b/BauSystem_Main/src/de/steamwar/bausystem/features/util/items/SpeedBauGuiItem.java @@ -19,6 +19,7 @@ package de.steamwar.bausystem.features.util.items; +import de.steamwar.bausystem.BauSystem; import de.steamwar.bausystem.Permission; import de.steamwar.bausystem.config.ColorConfig; import de.steamwar.bausystem.linkage.specific.BauGuiItem; @@ -42,14 +43,14 @@ public class SpeedBauGuiItem extends BauGuiItem { @Override public ItemStack getItem(Player player) { - return new SWItem(Material.SUGAR, ColorConfig.HIGHLIGHT + "Geschwindigkeit", Arrays.asList(ColorConfig.BASE + "Aktuell: " + ColorConfig.HIGHLIGHT + player.getFlySpeed() * 10f), false, clickType -> { + return new SWItem(Material.SUGAR, BauSystem.MESSAGE.parse("SPEED_ITEM", player), Arrays.asList(BauSystem.MESSAGE.parse("SPEED_ITEM_LORE", player) + player.getFlySpeed() * 10f), false, clickType -> { }).getItemStack(); } @Override public boolean click(ClickType click, Player p) { p.closeInventory(); - SWAnvilInv inv = new SWAnvilInv(p, "Geschwindigkeit eingeben"); + SWAnvilInv inv = new SWAnvilInv(p, BauSystem.MESSAGE.parse("SPEED_TAB_NAME", p)); inv.setItem(Material.SUGAR); inv.setCallback(s -> p.performCommand("speed " + s)); inv.open(); From e73f1875afa857e907ed1dd520425f03316c94d8 Mon Sep 17 00:00:00 2001 From: yoyosource Date: Mon, 27 Dec 2021 15:51:31 +0100 Subject: [PATCH 25/34] Update SelectCommand Signed-off-by: yoyosource --- BauSystem_Main/src/BauSystem.properties | 8 +++ .../features/util/SelectCommand.java | 66 ++++++------------- 2 files changed, 29 insertions(+), 45 deletions(-) diff --git a/BauSystem_Main/src/BauSystem.properties b/BauSystem_Main/src/BauSystem.properties index ee2cac0f..4c673063 100644 --- a/BauSystem_Main/src/BauSystem.properties +++ b/BauSystem_Main/src/BauSystem.properties @@ -1054,6 +1054,14 @@ PANZERN_PROGRESS = §e{0} §7Blöcke übrig, §e{1} §7Blöcke pro Sekunde, §e{ PANZERN_DONE = §aZuende gepanzert # UTILS +SELECT_HELP = §8/§eselect §8[§7RegionsTyp§8] §8- §7Wähle einen RegionsTyp aus +SELECT_EXTENSION_HELP = §8/§eselect §8[§7RegionsTyp§8] §8[§7Extension§8] §8- §7Wähle einen RegionsTyp aus mit oder ohne Extension +SELECT_NO_PERMS = §cDu darfst hier nicht den Select Befehl verwenden +SELECT_GLOBAL_REGION = §cDie globale Region kannst du nicht auswählen +SELECT_NO_TYPE = §cDiese Region hat keinen {0} +SELECT_NO_EXTENSION = §cDiese Region hat keine Ausfahrmaße +SELECT_MESSAGE = §7WorldEdit auswahl auf {0}, {1}, {2} und {3}, {4}, {5} gesetzt + SKULL_HELP = §8/§eskull §8[§eSpieler§8] §8-§7 Gibt einen SpielerKopf SKULL_ITEM = §e{0}§8s Kopf diff --git a/BauSystem_Main/src/de/steamwar/bausystem/features/util/SelectCommand.java b/BauSystem_Main/src/de/steamwar/bausystem/features/util/SelectCommand.java index 0adf7316..0da7ade2 100644 --- a/BauSystem_Main/src/de/steamwar/bausystem/features/util/SelectCommand.java +++ b/BauSystem_Main/src/de/steamwar/bausystem/features/util/SelectCommand.java @@ -8,6 +8,9 @@ import de.steamwar.bausystem.region.Point; import de.steamwar.bausystem.region.Region; import de.steamwar.bausystem.region.utils.RegionExtensionType; import de.steamwar.bausystem.region.utils.RegionType; +import de.steamwar.command.GuardCheckType; +import de.steamwar.command.GuardChecker; +import de.steamwar.command.GuardResult; import de.steamwar.command.SWCommand; import de.steamwar.core.VersionedRunnable; import org.bukkit.entity.Player; @@ -19,65 +22,39 @@ public class SelectCommand extends SWCommand { super("select"); } - @Register(help = true) - public void genericHelp(Player p, String... args) { - p.sendMessage("§8/§eselect §8[§7RegionsTyp§8] §8- §7Wähle einen RegionsTyp aus"); - p.sendMessage("§8/§eselect §8[§7RegionsTyp§8] §8[§7Extension§8] §8- §7Wähle einen RegionsTyp aus mit oder ohne Extension"); - } - - @Register - public void baurahmenCommand(Player p, RegionType regionType) { - if (!permissionCheck(p)) { - return; - } - + @Register(description = {"SELECT_HELP", "SELECT_EXTENSION_HELP"}) + public void baurahmenCommand(@Guard Player p, RegionType regionType, @OptionalValue("NORMAL") RegionExtensionType regionExtensionType) { Region region = Region.getRegion(p.getLocation()); if (region.isGlobal()) { - p.sendMessage(BauSystem.PREFIX + "§cDie globale Region kannst du nicht auswählen"); + BauSystem.MESSAGE.send("SELECT_GLOBAL_REGION", p); return; } if (!region.hasType(regionType)) { - p.sendMessage(BauSystem.PREFIX + "§cDiese Region hat keinen " + BauSystem.MESSAGE.parse(regionType.getChatValue(), p)); - return; - } - - setSelection(regionType, RegionExtensionType.NORMAL, region, p); - } - - @Register - public void baurahmenCommand(Player p, RegionType regionType, RegionExtensionType regionExtensionType) { - if (!permissionCheck(p)) { - return; - } - - Region region = Region.getRegion(p.getLocation()); - - if (region.isGlobal()) { - p.sendMessage(BauSystem.PREFIX + "§cDie globale Region kannst du nicht auswählen"); - return; - } - - if (!region.hasType(regionType)) { - p.sendMessage(BauSystem.PREFIX + "§cDiese Region hat keinen " + BauSystem.MESSAGE.parse(regionType.getChatValue(), p)); + BauSystem.MESSAGE.send("SELECT_NO_TYPE", p, BauSystem.MESSAGE.parse(regionType.getChatValue(), p)); return; } if (regionExtensionType == RegionExtensionType.EXTENSION && !region.hasExtensionType(regionType)) { - p.sendMessage(BauSystem.PREFIX + "§cDiese Region hat keine Ausfahrmaße"); + BauSystem.MESSAGE.send("SELECT_NO_EXTENSION", p); return; } setSelection(regionType, regionExtensionType, region, p); } - - private boolean permissionCheck(Player player) { - if (Permission.hasPermission(player, Permission.WORLDEDIT)) { - return true; - } - player.sendMessage(BauSystem.PREFIX + "§cDu darfst hier nicht den Select Befehl verwenden"); - return false; + @ClassGuard(value = Player.class, local = true) + public GuardChecker guardChecker() { + return (commandSender, guardCheckType, strings, s) -> { + Player player = (Player) commandSender; + if (Permission.hasPermission(player, Permission.WORLDEDIT)) { + return GuardResult.ALLOWED; + } + if (guardCheckType != GuardCheckType.TAB_COMPLETE) { + BauSystem.MESSAGE.send("SELECT_NO_PERMS", player); + } + return GuardResult.DENIED; + }; } private void setSelection(RegionType regionType, RegionExtensionType regionExtensionType, Region region, Player p) { @@ -85,7 +62,6 @@ public class SelectCommand extends SWCommand { Point maxPoint = region.getMaxPoint(regionType, regionExtensionType); VersionedRunnable.call(new VersionedRunnable(() -> SelectCommand_15.setSelection(p, minPoint, maxPoint), 15)); - p.sendMessage(BauSystem.PREFIX + "WorldEdit auswahl auf " + minPoint.getX() + ", " + minPoint.getY() + ", " + minPoint.getZ() + " und " + maxPoint.getX() + ", " + maxPoint.getY() + ", " + maxPoint.getZ() + " gesetzt"); + BauSystem.MESSAGE.send("SELECT_MESSAGE", p, minPoint.getX(), minPoint.getY(), minPoint.getZ(), maxPoint.getX(), maxPoint.getY(), maxPoint.getZ()); } - } From 14a28da8ed66219b10dcdd1782a02dfd61343412 Mon Sep 17 00:00:00 2001 From: zOnlyKroks Date: Mon, 27 Dec 2021 15:52:53 +0100 Subject: [PATCH 26/34] WaterVisionBauGuiItem --- BauSystem_Main/src/BauSystem.properties | 3 +++ .../bausystem/features/util/items/WaterVisionBauGuiItem.java | 5 +++-- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/BauSystem_Main/src/BauSystem.properties b/BauSystem_Main/src/BauSystem.properties index d7558f65..97a2a026 100644 --- a/BauSystem_Main/src/BauSystem.properties +++ b/BauSystem_Main/src/BauSystem.properties @@ -1065,6 +1065,9 @@ SPEED_ITEM = §eGeschwindigkeit SPEED_ITEM_LORE = §7Aktuell: §e SPEED_TAB_NAME = Geschwindigkeit eingeben +WATER_SIGHT_ON = §7Wassersicht: &eAktiviert +WATER_SIGHT_OFF = §7Wassersicht: &eDeaktiviert + TNT_CLICK_HEADER = §8---=== §eTNT §8===--- TNT_CLICK_ORDER = §eEntity Order§8: §e{0} TNT_CLICK_FUSE_TIME = §eFuseTime§8: §e{0} diff --git a/BauSystem_Main/src/de/steamwar/bausystem/features/util/items/WaterVisionBauGuiItem.java b/BauSystem_Main/src/de/steamwar/bausystem/features/util/items/WaterVisionBauGuiItem.java index 67621e71..ddceb05d 100644 --- a/BauSystem_Main/src/de/steamwar/bausystem/features/util/items/WaterVisionBauGuiItem.java +++ b/BauSystem_Main/src/de/steamwar/bausystem/features/util/items/WaterVisionBauGuiItem.java @@ -19,6 +19,7 @@ package de.steamwar.bausystem.features.util.items; +import de.steamwar.bausystem.BauSystem; import de.steamwar.bausystem.Permission; import de.steamwar.bausystem.config.ColorConfig; import de.steamwar.bausystem.linkage.specific.BauGuiItem; @@ -41,9 +42,9 @@ public class WaterVisionBauGuiItem extends BauGuiItem { @Override public ItemStack getItem(Player player) { if (player.hasPotionEffect(PotionEffectType.WATER_BREATHING)) { - return new SWItem(Material.WATER_BUCKET, ColorConfig.BASE + "Wassersicht: " + ColorConfig.HIGHLIGHT + "Aktiviert").getItemStack(); + return new SWItem(Material.WATER_BUCKET, BauSystem.MESSAGE.parse("WATER_SIGHT_ON", player)).getItemStack(); } else { - return new SWItem(Material.BUCKET, ColorConfig.BASE + "Wassersicht: " + ColorConfig.HIGHLIGHT + "Deaktiviert").getItemStack(); + return new SWItem(Material.BUCKET, BauSystem.MESSAGE.parse("WATER_SIGHT_OFF", player)).getItemStack(); } } From 5522fa24c9f90e4d54374bd5968b34fac2922ec7 Mon Sep 17 00:00:00 2001 From: yoyosource Date: Mon, 27 Dec 2021 15:53:26 +0100 Subject: [PATCH 27/34] Update NightVisionCommand Signed-off-by: yoyosource --- .../features/util/NightVisionCommand.java | 14 ++++---------- 1 file changed, 4 insertions(+), 10 deletions(-) diff --git a/BauSystem_Main/src/de/steamwar/bausystem/features/util/NightVisionCommand.java b/BauSystem_Main/src/de/steamwar/bausystem/features/util/NightVisionCommand.java index 7c5758ee..245d561a 100644 --- a/BauSystem_Main/src/de/steamwar/bausystem/features/util/NightVisionCommand.java +++ b/BauSystem_Main/src/de/steamwar/bausystem/features/util/NightVisionCommand.java @@ -20,10 +20,10 @@ package de.steamwar.bausystem.features.util; import de.steamwar.bausystem.BauSystem; -import de.steamwar.bausystem.SWUtils; import de.steamwar.bausystem.linkage.LinkageType; import de.steamwar.bausystem.linkage.Linked; import de.steamwar.command.SWCommand; +import net.md_5.bungee.api.ChatMessageType; import org.bukkit.entity.Player; import org.bukkit.potion.PotionEffect; import org.bukkit.potion.PotionEffectType; @@ -35,20 +35,14 @@ public class NightVisionCommand extends SWCommand { super("nightvision", "nv", "light"); } - @Register(help = true) - public void genericHelp(Player p, String... args) { - BauSystem.MESSAGE.sendPrefixless("COMMAND_HELP_HEAD", p, "DebugStick"); - BauSystem.MESSAGE.sendPrefixless("NIGHT-VISION_COMMAND_HELP", p); - } - - @Register + @Register(description = "VISION_COMMAND_HELP") public void genericCommand(Player p) { if (p.hasPotionEffect(PotionEffectType.NIGHT_VISION)) { p.removePotionEffect(PotionEffectType.NIGHT_VISION); - SWUtils.sendToActionbar(p, BauSystem.MESSAGE.parse("NIGHT-VISION_OFF", p)); + BauSystem.MESSAGE.sendPrefixless("NIGHT-VISION_OFF", p, ChatMessageType.ACTION_BAR); return; } p.addPotionEffect(new PotionEffect(PotionEffectType.NIGHT_VISION, 1000000, 255, false, false)); - SWUtils.sendToActionbar(p, BauSystem.MESSAGE.parse("NIGHT-VISION_ON", p)); + BauSystem.MESSAGE.sendPrefixless("NIGHT-VISION_ON", p, ChatMessageType.ACTION_BAR); } } \ No newline at end of file From f1fa8ea29ff80d269abebbb8698e09eb981f5cb9 Mon Sep 17 00:00:00 2001 From: zOnlyKroks Date: Mon, 27 Dec 2021 15:55:49 +0100 Subject: [PATCH 28/34] WorldEditBauGuiItem --- BauSystem_Main/src/BauSystem.properties | 4 ++++ .../bausystem/features/util/items/WorldEditBauGuiItem.java | 3 ++- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/BauSystem_Main/src/BauSystem.properties b/BauSystem_Main/src/BauSystem.properties index f58d54b6..37e45a47 100644 --- a/BauSystem_Main/src/BauSystem.properties +++ b/BauSystem_Main/src/BauSystem.properties @@ -1076,6 +1076,10 @@ SPEED_TAB_NAME = Geschwindigkeit eingeben WATER_SIGHT_ON = §7Wassersicht: &eAktiviert WATER_SIGHT_OFF = §7Wassersicht: &eDeaktiviert +WORLDEDIT_WAND = WorldEdit Wand +WORLDEDIT_LEFTCLICK = Left click: select pos #1 +WORLDEDIT_RIGHTCLICK = Right click: select pos #2 + TNT_CLICK_HEADER = §8---=== §eTNT §8===--- TNT_CLICK_ORDER = §eEntity Order§8: §e{0} TNT_CLICK_FUSE_TIME = §eFuseTime§8: §e{0} diff --git a/BauSystem_Main/src/de/steamwar/bausystem/features/util/items/WorldEditBauGuiItem.java b/BauSystem_Main/src/de/steamwar/bausystem/features/util/items/WorldEditBauGuiItem.java index 7d5d377e..2da651fb 100644 --- a/BauSystem_Main/src/de/steamwar/bausystem/features/util/items/WorldEditBauGuiItem.java +++ b/BauSystem_Main/src/de/steamwar/bausystem/features/util/items/WorldEditBauGuiItem.java @@ -19,6 +19,7 @@ package de.steamwar.bausystem.features.util.items; +import de.steamwar.bausystem.BauSystem; import de.steamwar.bausystem.Permission; import de.steamwar.bausystem.linkage.LinkageType; import de.steamwar.bausystem.linkage.Linked; @@ -45,7 +46,7 @@ public class WorldEditBauGuiItem extends BauGuiItem { @Override public ItemStack getItem(Player player) { - return new SWItem(Material.WOODEN_AXE, "WorldEdit Wand", Arrays.asList("Left click: select pos #1", "Right click: select pos #2"), false, clickType -> { + return new SWItem(Material.WOODEN_AXE, BauSystem.MESSAGE.parse("WORLDEDIT_WAND", player), Arrays.asList(BauSystem.MESSAGE.parse("WORLDEDIT_LEFTCLICK", player), BauSystem.MESSAGE.parse("WORLDEDIT_RIGHTCLICK", player)), false, clickType -> { }).getItemStack(); } From 15a08a64f9d83c5ed7ec6cb2e66bc7a309631052 Mon Sep 17 00:00:00 2001 From: yoyosource Date: Mon, 27 Dec 2021 16:06:33 +0100 Subject: [PATCH 29/34] Update BauSystem.properties Signed-off-by: yoyosource --- .../features/detonator/Detoblock.java | 8 +- BauSystem_Main/src/BauSystem.properties | 156 +++++++++--------- .../src/de/steamwar/bausystem/Permission.java | 10 +- .../features/autostart/AutostartListener.java | 4 +- .../bausystem/features/bau/BauCommand.java | 6 +- .../features/bau/BauInfoBauGuiItem.java | 4 +- .../bausystem/features/bau/InfoCommand.java | 16 +- .../features/countingwand/Countingwand.java | 4 +- .../bausystem/features/gui/BauGUICommand.java | 6 +- .../gui/editor/BauGuiEditorGuiItem.java | 2 +- .../gui/editor/BauGuiImportExport.java | 6 +- .../bausystem/features/loader/Loader.java | 2 +- .../features/loader/LoaderButton.java | 8 +- .../observer/ObserverTracerCommand.java | 2 +- .../other/items/TeleportBauGuiItem.java | 4 +- .../features/tracer/TracerBauGuiItem.java | 14 +- .../features/tracer/gui/TraceShowGui.java | 4 +- .../features/tracer/record/RecordStatus.java | 12 +- .../features/util/DebugStickCommand.java | 2 +- .../features/util/MaterialCommand.java | 4 +- .../features/util/NightVisionCommand.java | 4 +- .../util/items/DebugstickBauGuiItem.java | 3 +- .../features/util/items/SkullBauGuiItem.java | 2 +- .../region/flags/flagvalues/ColorMode.java | 4 +- .../region/flags/flagvalues/TNTMode.java | 2 +- 25 files changed, 144 insertions(+), 145 deletions(-) diff --git a/BauSystem_API/src/de/steamwar/bausystem/features/detonator/Detoblock.java b/BauSystem_API/src/de/steamwar/bausystem/features/detonator/Detoblock.java index d9c4e14d..85facc7a 100644 --- a/BauSystem_API/src/de/steamwar/bausystem/features/detonator/Detoblock.java +++ b/BauSystem_API/src/de/steamwar/bausystem/features/detonator/Detoblock.java @@ -28,10 +28,10 @@ import lombok.RequiredArgsConstructor; @Getter public enum Detoblock { SWITCH(0, true, "DETONATOR_BUTTON_SWITCH"), - WOOD_BUTTON(30, "DETONATOR_BUTTON_WOOD-Button"), - STONE_BUTTON(20, "DETONATOR_BUTTON_STONE-Button"), - PRESSURE_PLATE(30, "DETONATOR_BUTTON_PRESSURE-PLATE"), - WEIGHTED_PRESSURE_PLATE(20, "DETONATOR_BUTTON_WEIGHTED-PRESSURE-PLATE"), + WOOD_BUTTON(30, "DETONATOR_BUTTON_WOOD_BUTTON"), + STONE_BUTTON(20, "DETONATOR_BUTTON_STONE_BUTTON"), + PRESSURE_PLATE(30, "DETONATOR_BUTTON_PRESSURE_PLATE"), + WEIGHTED_PRESSURE_PLATE(20, "DETONATOR_BUTTON_WEIGHTED-PRESSURE_PLATE"), TRIPWIRE(30, "DETONATOR_BUTTON_TRIPWIRE"), NOTEBLOCK(1, "DETONATOR_BUTTON_NOTEBLOCK"), DAYLIGHTSENSOR(0, true, "DETONATOR_BUTTON_DAYLIGHTSENSOR"), diff --git a/BauSystem_Main/src/BauSystem.properties b/BauSystem_Main/src/BauSystem.properties index 37e45a47..5c2e055d 100644 --- a/BauSystem_Main/src/BauSystem.properties +++ b/BauSystem_Main/src/BauSystem.properties @@ -28,11 +28,11 @@ LIST_NEXT_PAGE=§eNächste Seite # Permission PERMISSION_WORLD = Einstellungen vornehmen -PERMISSION_WORLD-EDIT = WorldEdit verwenden -PERMISSION_CHANGE_YOU-ENABLE = §aDer Spieler darf nun {0} -PERMISSION_CHANGE_YOU-DISABLE = §cDer Spieler darf nun nicht mehr {0} -PERMISSION_CHANGE_OTHER-ENABLE = §aDu kannst nun auf der Welt von §6{0} §a{1} -PERMISSION_CHANGE_OTHER-DISABLE = §cDu kannst nun nicht mehr auf der Welt von §6{0} §c{1} +PERMISSION_WORLD_EDIT = WorldEdit verwenden +PERMISSION_CHANGE_YOU_ENABLE = §aDer Spieler darf nun {0} +PERMISSION_CHANGE_YOU_DISABLE = §cDer Spieler darf nun nicht mehr {0} +PERMISSION_CHANGE_OTHER_ENABLE = §aDu kannst nun auf der Welt von §6{0} §a{1} +PERMISSION_CHANGE_OTHER_DISABLE = §cDu kannst nun nicht mehr auf der Welt von §6{0} §c{1} # Scoreboard SCOREBOARD_TIME = Uhrzeit @@ -63,7 +63,7 @@ FLAG_PROTECT_INACTIVE = §caus FLAG_TNT_ALLOW = §aan FLAG_TNT_DENY = §caus -FLAG_TNT_ONLY-TB = §7Kein §eBaurahmen +FLAG_TNT_ONLY_TB = §7Kein §eBaurahmen FLAG_DAMAGE_ALLOW = §aan FLAG_DAMAGE_DENY = §caus @@ -71,13 +71,13 @@ FLAG_DAMAGE_DENY = §caus FLAG_COLOR_WHITE = §fWeiß FLAG_COLOR_ORANGE = §6Orange FLAG_COLOR_MAGENTA = §dMagenta -FLAG_COLOR_LIGHT-BLUE = §bHellblau +FLAG_COLOR_LIGHT_BLUE = §bHellblau FLAG_COLOR_YELLOW = §eGelb FLAG_COLOR_LIME = §aHellgrün ## This cannot be converted FLAG_COLOR_PINK = §ePink FLAG_COLOR_GRAY = §8Grau -FLAG_COLOR_LIGHT-GRAY = §7Hellgrau +FLAG_COLOR_LIGHT_GRAY = §7Hellgrau FLAG_COLOR_CYAN = §3Cyan FLAG_COLOR_PURPLE = §5Lila FLAG_COLOR_BLUE = §1Blau @@ -96,7 +96,7 @@ REGION_TYPE_ONLY_TB = Testblock AUTOSTART_COMMAND_HELP = §8/§etimer §8- §7Legt den AutostartTimer ins Inventar AUTOSTART_ITEM_NAME = §eAutostartTimer AUTOSTART_ITEM_LORE = §eRechtsklick Block §8- §7Starte den Timer -AUTOSTART_MESSAGE_NO-REGION = §cDu befindest dich derzeit in keiner Region +AUTOSTART_MESSAGE_NO_REGION = §cDu befindest dich derzeit in keiner Region AUTOSTART_MESSAGE_RESET = §eDer AutostartTimer wurde zurückgesetzt AUTOSTART_MESSAGE_START = §eAutostartTimer gestartet AUTOSTART_MESSAGE_RESULT1 = §eZeit §7bis zur §eExplosion §7am Gegner§8:§e {0} @@ -126,47 +126,47 @@ BACKUP_LORE=§eKlicken zum Laden BAU_COMMAND_HELP_INFO = §8/§ebau info §8- §7Alias für §8/§ebauinfo BAU_COMMAND_HELP_TOGGLEWE = §8/§ebau togglewe §8[§7Player§8] §8- §7Editiere die WorldEdit Rechte eines Spielers BAU_COMMAND_HELP_TOGGLEWORLD = §8/§ebau toggleworld §8[§7Player§8] §8- §7Editiere die Welt Rechte eines Spielers -BAU_UNKNOWN-PLAYER = §cUnbekannter Spieler -BAU_NO-PLAYER = §cDer Spieler ist kein Mitglied deiner Welt! -BAU_NO-WORLD = §cDies ist nicht deine Welt! +BAU_UNKNOWN_PLAYER = §cUnbekannter Spieler +BAU_NO_PLAYER = §cDer Spieler ist kein Mitglied deiner Welt! +BAU_NO_WORLD = §cDies ist nicht deine Welt! -BAU-INFO_ITEM_NAME = §eBau-Management +BAU_INFO_ITEM_NAME = §eBau-Management ## This is used in BauInfoBauGuiItem.java -BAU-INFO_ITEM_LORE-TNT = §7TNT§8: §e{0} -BAU-INFO_ITEM_LORE-FREEZE = §7Freeze§8: §e{0} -BAU-INFO_ITEM_LORE-DAMAGE = §7Damage§8: §e{0} -BAU-INFO_ITEM_LORE-FIRE = §7Feuer§8: §e{0} -BAU-INFO_ITEM_LORE-COLOR = §7Farbe§8: §e{0} -BAU-INFO_ITEM_LORE-PROTECT = §7Protect§8: §e{0} +BAU_INFO_ITEM_LORE_TNT = §7TNT§8: §e{0} +BAU_INFO_ITEM_LORE_FREEZE = §7Freeze§8: §e{0} +BAU_INFO_ITEM_LORE_DAMAGE = §7Damage§8: §e{0} +BAU_INFO_ITEM_LORE_FIRE = §7Feuer§8: §e{0} +BAU_INFO_ITEM_LORE_COLOR = §7Farbe§8: §e{0} +BAU_INFO_ITEM_LORE_PROTECT = §7Protect§8: §e{0} -BAU-INFO_COMMAND_HELP = §8/§ebauinfo §8- §7Gibt Informationen über den Bau -BAU-INFO_COMMAND_OWNER = §7Besitzer: §e{0} -BAU-INFO_COMMAND_MEMBER = §7Mitglieder: §e -BAU-INFO_MEMBER_INFO = §e{0}§8[{1}§8,{2}§8] §8 -BAU-INFO_MEMBER_WE_ALLOW = §aWE -BAU-INFO_MEMBER_WE_DISALLOW = §cWE -BAU-INFO_MEMBER_WORLD_ALLOW = §aW -BAU-INFO_MEMBER_WORLD_DISALLOW = §cW -BAU-INFO_COMMAND_FLAG = §e{0} §8: §7{1} -BAU-INFO_COMMAND_TPS = TPS:§e +BAU_INFO_COMMAND_HELP = §8/§ebauinfo §8- §7Gibt Informationen über den Bau +BAU_INFO_COMMAND_OWNER = §7Besitzer: §e{0} +BAU_INFO_COMMAND_MEMBER = §7Mitglieder: §e +BAU_INFO_MEMBER_INFO = §e{0}§8[{1}§8,{2}§8] §8 +BAU_INFO_MEMBER_WE_ALLOW = §aWE +BAU_INFO_MEMBER_WE_DISALLOW = §cWE +BAU_INFO_MEMBER_WORLD_ALLOW = §aW +BAU_INFO_MEMBER_WORLD_DISALLOW = §cW +BAU_INFO_COMMAND_FLAG = §e{0} §8: §7{1} +BAU_INFO_COMMAND_TPS = TPS:§e # Countingwand COUNTINGWAND_COMMAND_HELP = §8/§ecountingwand §8- §7Gibt dir en CountingWand COUNTINGWAND_ITEM_NAME = §eZollstock COUNTINGWAND_ITEM_LORE1 = §eLinksklick §8- §7Setzt die 1. Position COUNTINGWAND_ITEM_LORE2 = §eRechtsklick §8- §7Setzt die 2. Position -COUNTINGWAND_MESSAGE_R-CLICK = §7Erste Position bei: §8[§7{0}§8, §7{1}§8, §7{2}§8] ({3}§8) -COUNTINGWAND_MESSAGE_L-CLICK = §7Zweite Position bei: §8[§7{0}§8, §7{1}§8, §7{2}§8] ({3}§8) +COUNTINGWAND_MESSAGE_RCLICK = §7Erste Position bei: §8[§7{0}§8, §7{1}§8, §7{2}§8] ({3}§8) +COUNTINGWAND_MESSAGE_LCLICK = §7Zweite Position bei: §8[§7{0}§8, §7{1}§8, §7{2}§8] ({3}§8) COUNTINGWAND_MESSAGE_DIMENSION = §e{0}§8, §e{1}§8, §e{2} # Detonator DETONATOR_LOC_REMOVE = §e{0} entfernt DETONATOR_LOC_ADD = §e{0} hinzugefügt DETONATOR_BUTTON_SWITCH=Hebel -DETONATOR_BUTTON_WOOD-Button=Knopf -DETONATOR_BUTTON_STONE-Button=Knopf -DETONATOR_BUTTON_PRESSURE-PLATE=Druckplatte -DETONATOR_BUTTON_WEIGHTED-PRESSURE-PLATE=Druckplatte +DETONATOR_BUTTON_WOOD_BUTTON=Knopf +DETONATOR_BUTTON_STONE_BUTTON=Knopf +DETONATOR_BUTTON_PRESSURE_PLATE=Druckplatte +DETONATOR_BUTTON_WEIGHTED-PRESSURE_PLATE=Druckplatte DETONATOR_BUTTON_TRIPWIRE=Tripwire DETONATOR_BUTTON_NOTEBLOCK=Noteblock DETONATOR_BUTTON_DAYLIGHTSENSOR=Tageslichtsensor @@ -196,11 +196,11 @@ HOTBAR_SAVED=§7Deine Hotbar wurde als Standard gespeichert HOTBAR_LOADED=§7Deine Standard Hotbar wurde geladen HOTBAR_INVENTORY=Standard Hotbar # GUI -GUI_EDITOR_ITEM-NAME=§eGui Editor +GUI_EDITOR_ITEM_NAME=§eGui Editor GUI_EXPORT_CODE=§eDein Gui-Code: -GUI_EXPORT_CODE-HOVER=§eKopieren -GUI_IMPORT_INVALID-CODE=§eInvalider Gui-Code -GUI_IMPORT_CODE-SUCCESSFUL=§eGui-Code eingelesen +GUI_EXPORT_CODE_HOVER=§eKopieren +GUI_IMPORT_INVALID_CODE=§eInvalider Gui-Code +GUI_IMPORT_CODE_SUCCESSFUL=§eGui-Code eingelesen GUI_NAME=Bau GUI GUI_NO_PERMISSION=§cDu hast nicht genug Rechte um dies zu tun GUI_NO_OWNER=§cDas ist nicht deine Bauwelt @@ -648,15 +648,15 @@ TPSLIMIT_INVALID_FROZEN = §c und '0' # Trace TRACE_RECORD=§aan -TRACE_RECORD-AUTO=§aan -TRACE_RECORD-SINGLE=§aan +TRACE_RECORD_AUTO=§aan +TRACE_RECORD_SINGLE=§aan TRACE_IDLE=§caus -TRACE_IDLE-AUTO=§eauto -TRACE_IDLE-SINGLE=§esingle -TRACE_MESSAGE-AUTO_RECORD=§cTNT-Tracer muss gestoppt werden -TRACE_MESSAGE-AUTO_RECORD-AUTO=§cTNT-Tracer darf nicht aufnehmen -TRACE_MESSAGE-AUTO_IDLE=§cAuto-Tracer gestoppt -TRACE_MESSAGE-AUTO_IDLE-AUTO = §aAuto-Tracer gestartet +TRACE_IDLE_AUTO=§eauto +TRACE_IDLE_SINGLE=§esingle +TRACE_MESSAGE_AUTO_RECORD=§cTNT-Tracer muss gestoppt werden +TRACE_MESSAGE_AUTO_RECORD_AUTO=§cTNT-Tracer darf nicht aufnehmen +TRACE_MESSAGE_AUTO_IDLE=§cAuto-Tracer gestoppt +TRACE_MESSAGE_AUTO_IDLE_AUTO = §aAuto-Tracer gestartet TRACE_MESSAGE_START = §aTNT-Tracer gestartet TRACE_MESSAGE_SINGLE = §aSingle-Tracer gestartet TRACE_MESSAGE_STOP = §cTNT-Tracer gestoppt @@ -677,12 +677,12 @@ TRACE_COMMAND_HELP_LIST = §8/§etrace list §8- §7Trace GUI nur im Chat TRACE_COMMAND_HELP_GUI = §8/§etrace gui §8- §7Zeigt die Trace Oberfläche an TRACE_GUI_NAME = Tracer Gui -TRACE_GUI_TRACE-INACTIVE = §eTracer Starten -TRACE_GUI_TRACE-ACTIVE = §eTracer Stoppen -TRACE_GUI_TRACE-ACTIVE-AUTO = §eAuto-Trace ist Aktiv -TRACE_GUI_AUTO-TRACE-INACTIVE = §eAuto-Tracer Aktivieren -TRACE_GUI_AUTO-TRACE-ACTIVE = §eAuto-Tracer Deaktivieren -TRACE_GUI_SHOW-GUI = §eTrace Show Gui +TRACE_GUI_TRACE_INACTIVE = §eTracer Starten +TRACE_GUI_TRACE_ACTIVE = §eTracer Stoppen +TRACE_GUI_TRACE_ACTIVE_AUTO = §eAuto-Trace ist Aktiv +TRACE_GUI_AUTO_TRACE_INACTIVE = §eAuto-Tracer Aktivieren +TRACE_GUI_AUTO_TRACE_ACTIVE = §eAuto-Tracer Deaktivieren +TRACE_GUI_SHOW_GUI = §eTrace Show Gui TRACE_GUI_DELETE = §eTrace Löschen TRACE_SHOW_GUI_TITLE = Trace Show GUI @@ -691,12 +691,12 @@ TRACE_SHOW_GUI_HIDDEN = §cTraces ausgeblendet TRACE_SHOW_GUI_WATER_ITEM = §eWasser §7Positionen TRACE_SHOW_GUI_WATER_LORE1 = §7Zeigt alles TNT, welches TRACE_SHOW_GUI_WATER_LORE2 = §7im Wasser explodiert ist. -TRACE_SHOW_GUI_INTERPOLATE-Y_ITEM = §eInterpolation §7Y-Achse -TRACE_SHOW_GUI_INTERPOLATE-Y_LORE1 = §7Zeigt die Interpolation -TRACE_SHOW_GUI_INTERPOLATE-Y_LORE2 = §7auf der Y-Achse. -TRACE_SHOW_GUI_INTERPOLATE-XZ_ITEM = §eInterpolation §7XZ-Achse -TRACE_SHOW_GUI_INTERPOLATE-XZ_LORE1 = §7Zeigt die Interpolation -TRACE_SHOW_GUI_INTERPOLATE-XZ_LORE2 = §7auf der XZ-Achse. +TRACE_SHOW_GUI_INTERPOLATE_Y_ITEM = §eInterpolation §7Y-Achse +TRACE_SHOW_GUI_INTERPOLATE_Y_LORE1 = §7Zeigt die Interpolation +TRACE_SHOW_GUI_INTERPOLATE_Y_LORE2 = §7auf der Y-Achse. +TRACE_SHOW_GUI_INTERPOLATE_XZ_ITEM = §eInterpolation §7XZ-Achse +TRACE_SHOW_GUI_INTERPOLATE_XZ_LORE1 = §7Zeigt die Interpolation +TRACE_SHOW_GUI_INTERPOLATE_XZ_LORE2 = §7auf der XZ-Achse. TRACE_GUI_TITLE = Trace GUI TRACE_GUI_ITEM_BACK = §eBack @@ -739,14 +739,14 @@ LOADER_PAUSE = §7Pause LOADER_END = §8Finished LOADER_MESSAGE_CLEAR = §7Loader gecleart -LOADER_MESSAGE_CLEAR-HELP = §cDu must im Setup-Modus sein um den Loader zu clearen +LOADER_MESSAGE_CLEAR_HELP = §cDu must im Setup-Modus sein um den Loader zu clearen LOADER_MESSAGE_TNT = §eTNT hinzugefügt {0} LOADER_MESSAGE_INTERACT = §e{0} hinzugefügt {1} LOADER_BUTTON_SWITCH=Hebel -LOADER_BUTTON_WOOD-Button=Knopf -LOADER_BUTTON_STONE-Button=Knopf -LOADER_BUTTON_PRESSURE-PLATE=Druckplatte -LOADER_BUTTON_WEIGHTED-PRESSURE-PLATE=Druckplatte +LOADER_BUTTON_WOOD_BUTTON=Knopf +LOADER_BUTTON_STONE_BUTTON=Knopf +LOADER_BUTTON_PRESSURE_PLATE=Druckplatte +LOADER_BUTTON_WEIGHTED_PRESSURE_PLATE=Druckplatte LOADER_BUTTON_TRIPWIRE=Tripwire LOADER_BUTTON_NOTEBLOCK=Noteblock LOADER_BUTTON_DAYLIGHTSENSOR=Tageslichtsensor @@ -826,12 +826,12 @@ OBSERVER_ENABLE = §7Observer Trace gestartet OBSERVER_DISABLE = §7Observer Trace gestoppt OBSERVER_DELETE = §7Observer Trace gelöscht OBSERVER_RETRACE_DONE = §7Observer Trace neu berechnet -OBSERVER_RETRACE_NO-TRACE = §7Kein Observer Trace zum neu berechnen +OBSERVER_RETRACE_NO_TRACE = §7Kein Observer Trace zum neu berechnen # Other OTHER_ITEMS_TELEPORT_NAME=§eTeleporter -OTHER_ITEMS_TELEPORT_GUI-NAME=Teleportieren -OTHER_ITEMS_TELEPORT_PLAYER-OFFLINE=§cDer Spieler ist Offline +OTHER_ITEMS_TELEPORT_GUI_NAME=Teleportieren +OTHER_ITEMS_TELEPORT_PLAYER_OFFLINE=§cDer Spieler ist Offline OTHER_SLOT_INVALID_SLOT=§cInvalider Slot OTHER_NOCLIP_SLOT_INFO=§7Mit /slot kannst du den ausgewählten Slot ändern und einen anderen Block in den Slot nehmen. OTHER_NOCLIP_SLOT_HELP_PICK = §8/§eslot pick §8-§7 Lege den angeguckten Block ins Inventar @@ -865,18 +865,18 @@ OTHER_TPS_MESSAGE = §7 §e{0}§7 §e{1}§7 §e{2}§7 §e{3}§7 OTHER_TPS_SINGLE = §8TPS: §e{0} OTHER_WORLDSPAWN_HELP=§8/§eworldspawn §8-§e Teleportiere dich zum Spawn # DebugStick -DEBUG-STICK_COMMAND_HELP=§8/§edebugstick §8-§7 Erhalte einen DebugStick -DEBUG-STICK_NAME=§eDEBUGSTICK +DEBUG_STICK_COMMAND_HELP=§8/§edebugstick §8-§7 Erhalte einen DebugStick +DEBUG_STICK_NAME=§eDebugstick #Skull Gui -ANVIL-INV_NAME=Spieler name" +ANVIL_INV_NAME=Spieler name" # StructureVoid -STRUCTURE-VOID_COMMAND_HELP=§8/§estructureVoid §8-§7 Erhalte ein StructureVoid +STRUCTURE_VOID_COMMAND_HELP=§8/§estructureVoid §8-§7 Erhalte ein StructureVoid # NightVision -NIGHT-VISION_COMMAND_HELP=§8/§enightvision §8-§7 Schalte Nightvision an oder aus. -NIGHT-VISION_OFF=§eNightvision deaktiviert -NIGHT-VISION_ON=§eNightvision aktiviert -NIGHT_VISION_ITEM_ON:&Nightvision: &eAktiviert -NIGHT_VISION_ITEM_OFF:&Nightvision: &eDeaktiviert +NIGHT_VISION_COMMAND_HELP=§8/§enightvision §8-§7 Schalte Nightvision an oder aus. +NIGHT_VISION_OFF=§eNightvision deaktiviert +NIGHT_VISION_ON=§eNightvision aktiviert +NIGHT_VISION_ITEM_ON = &Nightvision: &eAktiviert +NIGHT_VISION_ITEM_OFF = &Nightvision: &eDeaktiviert #Navigation Wand NAVIGATION_WAND=&eNavigation Wand NAVIGATION_WAND_LEFT_CLICK="&eLeft click: jump to location" @@ -899,7 +899,7 @@ MATERIAL_SEARCH_BLASTRESISTANCE_MIN=§eBlast Resistance mindestens MATERIAL_SEARCH_BLASTRESISTANCE_MAX=§eBlast Resistance maximal MATERIAL_SEARCH_BLASTRESISTANCE_EXACT=§eBlast Resistance MATERIAL_SEARCH_VALUE=§8: §e{0} -MATERIAL_BLAST-RESISTANCE=§8- §eBlast Resistance§8: §7{0} +MATERIAL_BLAST_RESISTANCE=§8- §eBlast Resistance§8: §7{0} MATERIAL_HARDNESS=§8- §eHärte§8: §7{0} MATERIAL_TNT_BREAKABLE=§8- §eZerstörbar durch TNT MATERIAL_TNT_UNBREAKABLE=§8- §eNicht Zerstörbar durch TNT @@ -907,7 +907,7 @@ MATERIAL_TRANSPARENT=§8- §eTransparenter Block MATERIAL_SOLID=§8- §eSolider Block MATERIAL_GRAVITY=§8- §eFallender Block MATERIAL_OCCLUDING=§8- §eOccluding Block -MATERIAL_INTERACT-ABLE=§8- §eInterargierbarer Block +MATERIAL_INTERACTABLE=§8- §eInterargierbarer Block MATERIAL_FLAMMABLE=§8- §eFlammbarer Block MATERIAL_BURNABLE=§8- §eBrennbarer Block MATERIAL_WATERLOGGABLE=§8- §eWasserspeicherbarer Block diff --git a/BauSystem_Main/src/de/steamwar/bausystem/Permission.java b/BauSystem_Main/src/de/steamwar/bausystem/Permission.java index 70d7d2b5..8e31d4fd 100644 --- a/BauSystem_Main/src/de/steamwar/bausystem/Permission.java +++ b/BauSystem_Main/src/de/steamwar/bausystem/Permission.java @@ -40,7 +40,7 @@ public enum Permission { }), WORLDEDIT(BauweltMember::isWorldEdit, (player, target) -> { target.setWorldEdit(!target.isWorldEdit()); - sendMessages(player, target.isWorldEdit(), target, "PERMISSION_WORLD-EDIT"); + sendMessages(player, target.isWorldEdit(), target, "PERMISSION_WORLD_EDIT"); }), MEMBER(bauweltMember -> true), OWNER(bauweltMember -> false); @@ -69,15 +69,15 @@ public enum Permission { Player targetPlayer = Bukkit.getPlayer(SteamwarUser.get(target.getMemberID()).getUUID()); if (targetPlayer != null) { if (ableTo) { - BauSystem.MESSAGE.send("PERMISSION_CHANGE_OTHER-ENABLE", targetPlayer, player.getName(), BauSystem.MESSAGE.parse(what, targetPlayer)); + BauSystem.MESSAGE.send("PERMISSION_CHANGE_OTHER_ENABLE", targetPlayer, player.getName(), BauSystem.MESSAGE.parse(what, targetPlayer)); } else { - BauSystem.MESSAGE.send("PERMISSION_CHANGE_OTHER-DISABLE", targetPlayer, player.getName(), BauSystem.MESSAGE.parse(what, targetPlayer)); + BauSystem.MESSAGE.send("PERMISSION_CHANGE_OTHER_DISABLE", targetPlayer, player.getName(), BauSystem.MESSAGE.parse(what, targetPlayer)); } } if (ableTo) { - BauSystem.MESSAGE.send("PERMISSION_CHANGE_YOU-ENABLE", player, BauSystem.MESSAGE.parse(what, player)); + BauSystem.MESSAGE.send("PERMISSION_CHANGE_YOU_ENABLE", player, BauSystem.MESSAGE.parse(what, player)); } else { - BauSystem.MESSAGE.send("PERMISSION_CHANGE_YOU-DISABLE", player, BauSystem.MESSAGE.parse(what, player)); + BauSystem.MESSAGE.send("PERMISSION_CHANGE_YOU_DISABLE", player, BauSystem.MESSAGE.parse(what, player)); } } diff --git a/BauSystem_Main/src/de/steamwar/bausystem/features/autostart/AutostartListener.java b/BauSystem_Main/src/de/steamwar/bausystem/features/autostart/AutostartListener.java index 7b16da9d..c576d0ba 100644 --- a/BauSystem_Main/src/de/steamwar/bausystem/features/autostart/AutostartListener.java +++ b/BauSystem_Main/src/de/steamwar/bausystem/features/autostart/AutostartListener.java @@ -77,11 +77,11 @@ public class AutostartListener implements Listener { public void activate(Player player) { Region region = Region.getRegion(player.getLocation()); if (region.isGlobal()) { - BauSystem.MESSAGE.send("AUTOSTART_MESSAGE_NO-REGION", player); + BauSystem.MESSAGE.send("AUTOSTART_MESSAGE_NO_REGION", player); return; } if (!region.hasType(RegionType.TESTBLOCK)) { - BauSystem.MESSAGE.send("AUTOSTART_MESSAGE_NO-REGION", player); + BauSystem.MESSAGE.send("AUTOSTART_MESSAGE_NO_REGION", player); return; } if (regionStartTime.containsKey(region)) { diff --git a/BauSystem_Main/src/de/steamwar/bausystem/features/bau/BauCommand.java b/BauSystem_Main/src/de/steamwar/bausystem/features/bau/BauCommand.java index 6b3f49de..c31940e1 100644 --- a/BauSystem_Main/src/de/steamwar/bausystem/features/bau/BauCommand.java +++ b/BauSystem_Main/src/de/steamwar/bausystem/features/bau/BauCommand.java @@ -90,13 +90,13 @@ public class BauCommand extends SWCommand { private boolean negativeToggleCheck(Player p, SteamwarUser id) { if (id == null) { - BauSystem.MESSAGE.send("BAU_UNKNOWN-PLAYER", p); + BauSystem.MESSAGE.send("BAU_UNKNOWN_PLAYER", p); return true; } BauweltMember target = BauweltMember.getBauMember(bauServer.getOwnerID(), id.getId()); if (target == null) { - BauSystem.MESSAGE.send("BAU_NO-PLAYER", p); + BauSystem.MESSAGE.send("BAU_NO_PLAYER", p); return true; } return false; @@ -128,7 +128,7 @@ public class BauCommand extends SWCommand { Player p = (Player) commandSender; if (!bauServer.getOwner().equals(p.getUniqueId())) { if (guardCheckType != GuardCheckType.TAB_COMPLETE) { - BauSystem.MESSAGE.send("BAU_NO-WORLD", p); + BauSystem.MESSAGE.send("BAU_NO_WORLD", p); } return GuardResult.DENIED; } diff --git a/BauSystem_Main/src/de/steamwar/bausystem/features/bau/BauInfoBauGuiItem.java b/BauSystem_Main/src/de/steamwar/bausystem/features/bau/BauInfoBauGuiItem.java index 761d4aa0..dc2e7349 100644 --- a/BauSystem_Main/src/de/steamwar/bausystem/features/bau/BauInfoBauGuiItem.java +++ b/BauSystem_Main/src/de/steamwar/bausystem/features/bau/BauInfoBauGuiItem.java @@ -46,7 +46,7 @@ public class BauInfoBauGuiItem extends BauGuiItem { @Override public ItemStack getItem(Player player) { SWItem itemStack = SWItem.getPlayerSkull(SteamwarUser.get(BauServer.getInstance().getOwner()).getUserName()); - itemStack.setName(BauSystem.MESSAGE.parse("BAU-INFO_ITEM_NAME", player)); + itemStack.setName(BauSystem.MESSAGE.parse("BAU_INFO_ITEM_NAME", player)); Region region = Region.getRegion(player.getLocation()); List stringList = new ArrayList<>(); for (Flag flag : Flag.getFlags()) { @@ -55,7 +55,7 @@ public class BauInfoBauGuiItem extends BauGuiItem { } Flag.Value value = region.get(flag); if (value != null) { - stringList.add(BauSystem.MESSAGE.parse("BAU-INFO_ITEM_LORE-" + flag.name(), player, BauSystem.MESSAGE.parse(value.getChatValue(), player))); + stringList.add(BauSystem.MESSAGE.parse("BAU-INFO_ITEM_LORE_" + flag.name(), player, BauSystem.MESSAGE.parse(value.getChatValue(), player))); } } itemStack.setLore(stringList); diff --git a/BauSystem_Main/src/de/steamwar/bausystem/features/bau/InfoCommand.java b/BauSystem_Main/src/de/steamwar/bausystem/features/bau/InfoCommand.java index 25fe55db..de23a4fb 100644 --- a/BauSystem_Main/src/de/steamwar/bausystem/features/bau/InfoCommand.java +++ b/BauSystem_Main/src/de/steamwar/bausystem/features/bau/InfoCommand.java @@ -30,7 +30,7 @@ public class InfoCommand extends SWCommand { @Register(help = true) public void genericHelp(Player p, String... args) { - BauSystem.MESSAGE.send("BAU-INFO_COMMAND_HELP", p); + BauSystem.MESSAGE.send("BAU_INFO_COMMAND_HELP", p); } @Register @@ -39,7 +39,7 @@ public class InfoCommand extends SWCommand { } public void sendBauInfo(Player p) { - BauSystem.MESSAGE.send("BAU-INFO_COMMAND_OWNER", p, SteamwarUser.get(bauServer.getOwnerID()).getUserName()); + BauSystem.MESSAGE.send("BAU_INFO_COMMAND_OWNER", p, SteamwarUser.get(bauServer.getOwnerID()).getUserName()); Region region = Region.getRegion(p.getLocation()); for (Flag flag : Flag.getFlags()) { if (flag == Flag.PROTECT && region.getFloorLevel() == 0) { @@ -47,25 +47,25 @@ public class InfoCommand extends SWCommand { } Flag.Value value = region.get(flag); if (value != null) { - BauSystem.MESSAGE.send("BAU-INFO_COMMAND_FLAG", p, BauSystem.MESSAGE.parse(flag.getChatValue(), p), BauSystem.MESSAGE.parse(value.getChatValue(), p)); + BauSystem.MESSAGE.send("BAU_INFO_COMMAND_FLAG", p, BauSystem.MESSAGE.parse(flag.getChatValue(), p), BauSystem.MESSAGE.parse(value.getChatValue(), p)); } } List members = BauweltMember.getMembers(bauServer.getOwnerID()); StringBuilder membermessage = new StringBuilder(); - membermessage.append(BauSystem.MESSAGE.parsePrefixed("BAU-INFO_COMMAND_MEMBER", p)); + membermessage.append(BauSystem.MESSAGE.parsePrefixed("BAU_INFO_COMMAND_MEMBER", p)); for (BauweltMember member : members) { - membermessage.append(BauSystem.MESSAGE.parse("BAU-INFO_MEMBER_INFO", p, + membermessage.append(BauSystem.MESSAGE.parse("BAU_INFO_MEMBER_INFO", p, SteamwarUser.get(member.getMemberID()).getUserName(), - member.isWorldEdit() ? BauSystem.MESSAGE.parse("BAU-INFO_MEMBER_WE_ALLOW", p) : BauSystem.MESSAGE.parse("BAU-INFO_MEMBER_WE_DISALLOW", p), - member.isWorld() ? BauSystem.MESSAGE.parse("BAU-INFO_MEMBER_WORLD_ALLOW", p) : BauSystem.MESSAGE.parse("BAU-INFO_MEMBER_WORLD_DISALLOW", p) + member.isWorldEdit() ? BauSystem.MESSAGE.parse("BAU_INFO_MEMBER_WE_ALLOW", p) : BauSystem.MESSAGE.parse("BAU_INFO_MEMBER_WE_DISALLOW", p), + member.isWorld() ? BauSystem.MESSAGE.parse("BAU_INFO_MEMBER_WORLD_ALLOW", p) : BauSystem.MESSAGE.parse("BAU_INFO_MEMBER_WORLD_DISALLOW", p) )); } p.sendMessage(membermessage.toString()); StringBuilder tpsMessage = new StringBuilder(); - tpsMessage.append(BauSystem.MESSAGE.parsePrefixed("BAU-INFO_COMMAND_TPS", p)); + tpsMessage.append(BauSystem.MESSAGE.parsePrefixed("BAU_INFO_COMMAND_TPS", p)); tpsMessage.append(" ").append(getTps(TPSWatcher.TPSType.ONE_SECOND)); tpsMessage.append(" ").append(getTps(TPSWatcher.TPSType.TEN_SECONDS)); if (!TPSWarpUtils.isWarping()) { diff --git a/BauSystem_Main/src/de/steamwar/bausystem/features/countingwand/Countingwand.java b/BauSystem_Main/src/de/steamwar/bausystem/features/countingwand/Countingwand.java index 4d09437e..e22fb958 100644 --- a/BauSystem_Main/src/de/steamwar/bausystem/features/countingwand/Countingwand.java +++ b/BauSystem_Main/src/de/steamwar/bausystem/features/countingwand/Countingwand.java @@ -71,9 +71,9 @@ public class Countingwand { if (newPos) { String dimension = getDimensions(p, selection.getKey(), selection.getValue()); if (pos1) { - BauSystem.MESSAGE.send("COUNTINGWAND_MESSAGE_R-CLICK", p, point.getX(), point.getY(), point.getZ(), dimension); + BauSystem.MESSAGE.send("COUNTINGWAND_MESSAGE_RCLICK", p, point.getX(), point.getY(), point.getZ(), dimension); } else { - BauSystem.MESSAGE.send("COUNTINGWAND_MESSAGE_L-CLICK", p, point.getX(), point.getY(), point.getZ(), dimension); + BauSystem.MESSAGE.send("COUNTINGWAND_MESSAGE_LCLICK", p, point.getX(), point.getY(), point.getZ(), dimension); } } } diff --git a/BauSystem_Main/src/de/steamwar/bausystem/features/gui/BauGUICommand.java b/BauSystem_Main/src/de/steamwar/bausystem/features/gui/BauGUICommand.java index 16a16904..4f24fcd5 100644 --- a/BauSystem_Main/src/de/steamwar/bausystem/features/gui/BauGUICommand.java +++ b/BauSystem_Main/src/de/steamwar/bausystem/features/gui/BauGUICommand.java @@ -61,7 +61,7 @@ public class BauGUICommand extends SWCommand { TextComponent component = new TextComponent(); component.setColor(ColorConfig.HIGHLIGHT); component.setBold(true); - component.setHoverEvent(new HoverEvent(HoverEvent.Action.SHOW_TEXT, TextComponent.fromLegacyText(BauSystem.MESSAGE.parse("GUI_EXPORT_CODE-HOVER", p)))); + component.setHoverEvent(new HoverEvent(HoverEvent.Action.SHOW_TEXT, TextComponent.fromLegacyText(BauSystem.MESSAGE.parse("GUI_EXPORT_CODE_HOVER", p)))); component.setClickEvent(new ClickEvent(ClickEvent.Action.COPY_TO_CLIPBOARD, export)); component.setText(export); BauSystem.MESSAGE.send("GUI_EXPORT_CODE", p); @@ -72,11 +72,11 @@ public class BauGUICommand extends SWCommand { public void importGui(Player p, String code) { try { if (BauGuiImportExport.importGui(code, p)) { - BauSystem.MESSAGE.send("GUI_IMPORT_CODE-SUCCESSFUL", p); + BauSystem.MESSAGE.send("GUI_IMPORT_CODE_SUCCESSFUL", p); } } catch (Exception e) { e.printStackTrace(); - BauSystem.MESSAGE.send("GUI_IMPORT_INVALID-CODE", p); + BauSystem.MESSAGE.send("GUI_IMPORT_INVALID_CODE", p); } } } diff --git a/BauSystem_Main/src/de/steamwar/bausystem/features/gui/editor/BauGuiEditorGuiItem.java b/BauSystem_Main/src/de/steamwar/bausystem/features/gui/editor/BauGuiEditorGuiItem.java index 24797e67..56eb6d8f 100644 --- a/BauSystem_Main/src/de/steamwar/bausystem/features/gui/editor/BauGuiEditorGuiItem.java +++ b/BauSystem_Main/src/de/steamwar/bausystem/features/gui/editor/BauGuiEditorGuiItem.java @@ -44,7 +44,7 @@ public class BauGuiEditorGuiItem extends BauGuiItem { @Override public ItemStack getItem(Player player) { - return new SWItem(Material.IRON_PICKAXE, BauSystem.MESSAGE.parse("GUI_EDITOR_ITEM-NAME", player)).getItemStack(); + return new SWItem(Material.IRON_PICKAXE, BauSystem.MESSAGE.parse("GUI_EDITOR_ITEM_NAME", player)).getItemStack(); } @Override diff --git a/BauSystem_Main/src/de/steamwar/bausystem/features/gui/editor/BauGuiImportExport.java b/BauSystem_Main/src/de/steamwar/bausystem/features/gui/editor/BauGuiImportExport.java index b454498d..cba3307f 100644 --- a/BauSystem_Main/src/de/steamwar/bausystem/features/gui/editor/BauGuiImportExport.java +++ b/BauSystem_Main/src/de/steamwar/bausystem/features/gui/editor/BauGuiImportExport.java @@ -104,12 +104,12 @@ public class BauGuiImportExport { append(st, Integer.toBinaryString(b & 0xFF), 8); } if (!st.substring(0, 5).equals(VERSION)) { - BauSystem.MESSAGE.send("GUI_IMPORT_INVALID-CODE", p); + BauSystem.MESSAGE.send("GUI_IMPORT_INVALID_CODE", p); return false; } int size = Integer.parseInt(st.substring(5, 8), 2); if (size <= 0 || size > 5) { - BauSystem.MESSAGE.send("GUI_IMPORT_INVALID-CODE", p); + BauSystem.MESSAGE.send("GUI_IMPORT_INVALID_CODE", p); return false; } size *= 9; @@ -153,7 +153,7 @@ public class BauGuiImportExport { s = s.substring(1); int itemID = Integer.parseInt(s, 2); if (!BauGUI.getITEMS().containsKey(itemID)) { - BauSystem.MESSAGE.send("GUI_IMPORT_INVALID-CODE", p); + BauSystem.MESSAGE.send("GUI_IMPORT_INVALID_CODE", p); return false; } map.put(itemID, currentIndex); diff --git a/BauSystem_Main/src/de/steamwar/bausystem/features/loader/Loader.java b/BauSystem_Main/src/de/steamwar/bausystem/features/loader/Loader.java index ae983351..01e81be5 100644 --- a/BauSystem_Main/src/de/steamwar/bausystem/features/loader/Loader.java +++ b/BauSystem_Main/src/de/steamwar/bausystem/features/loader/Loader.java @@ -118,7 +118,7 @@ public class Loader implements Listener { actions.clear(); BauSystem.MESSAGE.send("LOADER_MESSAGE_CLEAR", p); } else { - BauSystem.MESSAGE.send("LOADER_MESSAGE_CLEAR-HELP", p); + BauSystem.MESSAGE.send("LOADER_MESSAGE_CLEAR_HELP", p); } } diff --git a/BauSystem_Main/src/de/steamwar/bausystem/features/loader/LoaderButton.java b/BauSystem_Main/src/de/steamwar/bausystem/features/loader/LoaderButton.java index 331954b3..e5e74171 100644 --- a/BauSystem_Main/src/de/steamwar/bausystem/features/loader/LoaderButton.java +++ b/BauSystem_Main/src/de/steamwar/bausystem/features/loader/LoaderButton.java @@ -29,10 +29,10 @@ import org.bukkit.block.Block; @Getter public enum LoaderButton { SWITCH(0, true, "LOADER_BUTTON_SWITCH"), - WOOD_BUTTON(30, "LOADER_BUTTON_WOOD-Button"), - STONE_BUTTON(20, "LOADER_BUTTON_STONE-Button"), - PRESSURE_PLATE(30, "LOADER_BUTTON_PRESSURE-PLATE"), - WEIGHTED_PRESSURE_PLATE(20, "LOADER_BUTTON_WEIGHTED-PRESSURE-PLATE"), + WOOD_BUTTON(30, "LOADER_BUTTON_WOOD_BUTTON"), + STONE_BUTTON(20, "LOADER_BUTTON_STONE_BUTTON"), + PRESSURE_PLATE(30, "LOADER_BUTTON_PRESSURE_PLATE"), + WEIGHTED_PRESSURE_PLATE(20, "LOADER_BUTTON_WEIGHTED_PRESSURE_PLATE"), TRIPWIRE(30, "LOADER_BUTTON_TRIPWIRE"), NOTEBLOCK(1, "LOADER_BUTTON_NOTEBLOCK"), DAYLIGHTSENSOR(0, true, "LOADER_BUTTON_DAYLIGHTSENSOR"), diff --git a/BauSystem_Main/src/de/steamwar/bausystem/features/observer/ObserverTracerCommand.java b/BauSystem_Main/src/de/steamwar/bausystem/features/observer/ObserverTracerCommand.java index cdd95026..76d99616 100644 --- a/BauSystem_Main/src/de/steamwar/bausystem/features/observer/ObserverTracerCommand.java +++ b/BauSystem_Main/src/de/steamwar/bausystem/features/observer/ObserverTracerCommand.java @@ -55,7 +55,7 @@ public class ObserverTracerCommand extends SWCommand { @Register(value = "retrace", description = "OBSERVER_HELP_RETRACE") public void retrace(Player p) { if (ObserverTracerListener.observerTracerMap.containsKey(p)) { - BauSystem.MESSAGE.send("OBSERVER_RETRACE_NO-TRACE", p); + BauSystem.MESSAGE.send("OBSERVER_RETRACE_NO_TRACE", p); return; } ObserverTracerListener.observerTracerMap.get(p).trace(); diff --git a/BauSystem_Main/src/de/steamwar/bausystem/features/other/items/TeleportBauGuiItem.java b/BauSystem_Main/src/de/steamwar/bausystem/features/other/items/TeleportBauGuiItem.java index 6b6e3e97..e0df2221 100644 --- a/BauSystem_Main/src/de/steamwar/bausystem/features/other/items/TeleportBauGuiItem.java +++ b/BauSystem_Main/src/de/steamwar/bausystem/features/other/items/TeleportBauGuiItem.java @@ -49,10 +49,10 @@ public class TeleportBauGuiItem extends BauGuiItem { @Override public boolean click(ClickType click, Player p) { p.closeInventory(); - SWListInv inv = new SWListInv<>(p, BauSystem.MESSAGE.parse("OTHER_ITEMS_TELEPORT_GUI-NAME", p), SWListInv.createPlayerList(p.getUniqueId()), (clickType, o) -> { + SWListInv inv = new SWListInv<>(p, BauSystem.MESSAGE.parse("OTHER_ITEMS_TELEPORT_GUI_NAME", p), SWListInv.createPlayerList(p.getUniqueId()), (clickType, o) -> { Player t = Bukkit.getPlayer(o); if (t == null) { - BauSystem.MESSAGE.send("OTHER_ITEMS_TELEPORT_PLAYER-OFFLINE", p); + BauSystem.MESSAGE.send("OTHER_ITEMS_TELEPORT_PLAYER_OFFLINE", p); } else { p.performCommand("tp " + t.getName()); } diff --git a/BauSystem_Main/src/de/steamwar/bausystem/features/tracer/TracerBauGuiItem.java b/BauSystem_Main/src/de/steamwar/bausystem/features/tracer/TracerBauGuiItem.java index c2e6d952..0ba6eb48 100644 --- a/BauSystem_Main/src/de/steamwar/bausystem/features/tracer/TracerBauGuiItem.java +++ b/BauSystem_Main/src/de/steamwar/bausystem/features/tracer/TracerBauGuiItem.java @@ -55,36 +55,36 @@ public class TracerBauGuiItem extends BauGuiItem { SWInventory inv = new SWInventory(p, 9, BauSystem.MESSAGE.parse("TRACE_GUI_NAME", p)); if (status.isTracing()) { if (status.isAutoTrace()) { - inv.setItem(1, new SWItem(Material.GRAY_DYE, BauSystem.MESSAGE.parse("TRACE_GUI_TRACE-ACTIVE-AUTO", p))); + inv.setItem(1, new SWItem(Material.GRAY_DYE, BauSystem.MESSAGE.parse("TRACE_GUI_TRACE_ACTIVE_AUTO", p))); } else { - inv.setItem(1, new SWItem(Material.GREEN_DYE, BauSystem.MESSAGE.parse("TRACE_GUI_TRACE-ACTIVE", p), clickType -> { + inv.setItem(1, new SWItem(Material.GREEN_DYE, BauSystem.MESSAGE.parse("TRACE_GUI_TRACE_ACTIVE", p), clickType -> { p.performCommand("trace stop"); open(p); })); } } else { - inv.setItem(1, new SWItem(Material.RED_DYE, BauSystem.MESSAGE.parse("TRACE_GUI_TRACE-INACTIVE", p), clickType -> { + inv.setItem(1, new SWItem(Material.RED_DYE, BauSystem.MESSAGE.parse("TRACE_GUI_TRACE_INACTIVE", p), clickType -> { p.performCommand("trace start"); open(p); })); } if (status.isAutoTrace()) { - inv.setItem(3, new SWItem(Material.ENDER_EYE, BauSystem.MESSAGE.parse("TRACE_GUI_AUTO-TRACE-ACTIVE", p), clickType -> { + inv.setItem(3, new SWItem(Material.ENDER_EYE, BauSystem.MESSAGE.parse("TRACE_GUI_AUTO_TRACE_ACTIVE", p), clickType -> { p.performCommand("trace auto"); open(p); })); } else { - inv.setItem(3, new SWItem(Material.FIREWORK_STAR, BauSystem.MESSAGE.parse("TRACE_GUI_AUTO-TRACE-INACTIVE", p), clickType -> { + inv.setItem(3, new SWItem(Material.FIREWORK_STAR, BauSystem.MESSAGE.parse("TRACE_GUI_AUTO_TRACE_INACTIVE", p), clickType -> { p.performCommand("trace auto"); open(p); })); } if (TraceShowManager.hasActiveShow(p)) { - inv.setItem(5, new SWItem(Material.TNT, BauSystem.MESSAGE.parse("TRACE_GUI_SHOW-GUI", p), clickType -> { + inv.setItem(5, new SWItem(Material.TNT, BauSystem.MESSAGE.parse("TRACE_GUI_SHOW_GUI", p), clickType -> { p.performCommand("trace show gui"); })); } else { - inv.setItem(5, new SWItem(Material.GLASS, BauSystem.MESSAGE.parse("TRACE_GUI_SHOW-GUI", p), clickType -> { + inv.setItem(5, new SWItem(Material.GLASS, BauSystem.MESSAGE.parse("TRACE_GUI_SHOW_GUI", p), clickType -> { p.performCommand("trace show gui"); })); } diff --git a/BauSystem_Main/src/de/steamwar/bausystem/features/tracer/gui/TraceShowGui.java b/BauSystem_Main/src/de/steamwar/bausystem/features/tracer/gui/TraceShowGui.java index 8d3da073..d3eea803 100644 --- a/BauSystem_Main/src/de/steamwar/bausystem/features/tracer/gui/TraceShowGui.java +++ b/BauSystem_Main/src/de/steamwar/bausystem/features/tracer/gui/TraceShowGui.java @@ -56,13 +56,13 @@ public class TraceShowGui { swInventory.setItem(5, water); swInventory.setCallback(5, clickType -> toggleHideTNTinWaterExploded(player, swInventory, water)); - SWItem interpolateY = new SWItem(Material.QUARTZ_STAIRS, BauSystem.MESSAGE.parse("TRACE_SHOW_GUI_INTERPOLATE-Y_ITEM", player), Arrays.asList(BauSystem.MESSAGE.parse("TRACE_SHOW_GUI_INTERPOLATE-Y_LORE1", player), BauSystem.MESSAGE.parse("TRACE_SHOW_GUI_INTERPOLATE-Y_LORE2", player)), false, clickType -> { + SWItem interpolateY = new SWItem(Material.QUARTZ_STAIRS, BauSystem.MESSAGE.parse("TRACE_SHOW_GUI_INTERPOLATE_Y_ITEM", player), Arrays.asList(BauSystem.MESSAGE.parse("TRACE_SHOW_GUI_INTERPOLATE_Y_LORE1", player), BauSystem.MESSAGE.parse("TRACE_SHOW_GUI_INTERPOLATE_Y_LORE2", player)), false, clickType -> { }); swInventory.setItem(6, interpolateY); swInventory.setCallback(6, clickType -> toggleInterpolateYPosition(player, swInventory, interpolateY)); Material xzMaterial = VersionedCallable.call(new VersionedCallable<>(TNTTracer_15::getTraceXZMaterial, 14)); - SWItem interpolateXZ = new SWItem(xzMaterial, (byte) 7, BauSystem.MESSAGE.parse("TRACE_SHOW_GUI_INTERPOLATE-XZ_ITEM", player), Arrays.asList(BauSystem.MESSAGE.parse("TRACE_SHOW_GUI_INTERPOLATE-XZ_LORE1", player), BauSystem.MESSAGE.parse("TRACE_SHOW_GUI_INTERPOLATE-XZ_LORE2", player)), false, clickType -> { + SWItem interpolateXZ = new SWItem(xzMaterial, (byte) 7, BauSystem.MESSAGE.parse("TRACE_SHOW_GUI_INTERPOLATE_XZ_ITEM", player), Arrays.asList(BauSystem.MESSAGE.parse("TRACE_SHOW_GUI_INTERPOLATE_XZ_LORE1", player), BauSystem.MESSAGE.parse("TRACE_SHOW_GUI_INTERPOLATE_XZ_LORE2", player)), false, clickType -> { }); swInventory.setItem(7, interpolateXZ); swInventory.setCallback(7, clickType -> toggleInterpolateXZPosition(player, swInventory, interpolateXZ)); diff --git a/BauSystem_Main/src/de/steamwar/bausystem/features/tracer/record/RecordStatus.java b/BauSystem_Main/src/de/steamwar/bausystem/features/tracer/record/RecordStatus.java index e1198b11..6452571c 100644 --- a/BauSystem_Main/src/de/steamwar/bausystem/features/tracer/record/RecordStatus.java +++ b/BauSystem_Main/src/de/steamwar/bausystem/features/tracer/record/RecordStatus.java @@ -21,12 +21,12 @@ package de.steamwar.bausystem.features.tracer.record; public enum RecordStatus { - RECORD("TRACE_RECORD", true, "TRACE_MESSAGE-AUTO_RECORD"), - RECORD_AUTO("TRACE_RECORD-AUTO", true, "TRACE_MESSAGE-AUTO_RECORD-AUTO"), - RECORD_SINGLE("TRACE_RECORD-SINGLE", true, ""), - IDLE("TRACE_IDLE", false, "TRACE_MESSAGE-AUTO_IDLE"), - IDLE_AUTO("TRACE_IDLE-AUTO", false, "TRACE_MESSAGE-AUTO_IDLE-AUTO"), - IDLE_SINGLE("TRACE_IDLE-SINGLE", false, ""); + RECORD("TRACE_RECORD", true, "TRACE_MESSAGE_AUTO_RECORD"), + RECORD_AUTO("TRACE_RECORD_AUTO", true, "TRACE_MESSAGE_AUTO_RECORD_AUTO"), + RECORD_SINGLE("TRACE_RECORD_SINGLE", true, ""), + IDLE("TRACE_IDLE", false, "TRACE_MESSAGE_AUTO_IDLE"), + IDLE_AUTO("TRACE_IDLE_AUTO", false, "TRACE_MESSAGE_AUTO_IDLE_AUTO"), + IDLE_SINGLE("TRACE_IDLE_SINGLE", false, ""); String name; boolean tracing; diff --git a/BauSystem_Main/src/de/steamwar/bausystem/features/util/DebugStickCommand.java b/BauSystem_Main/src/de/steamwar/bausystem/features/util/DebugStickCommand.java index 3b5f0079..d7f7ab4e 100644 --- a/BauSystem_Main/src/de/steamwar/bausystem/features/util/DebugStickCommand.java +++ b/BauSystem_Main/src/de/steamwar/bausystem/features/util/DebugStickCommand.java @@ -34,7 +34,7 @@ public class DebugStickCommand extends SWCommand { super("debugstick"); } - @Register(description = "DEBUG-STICK_COMMAND_HELP") + @Register(description = "DEBUG_STICK_COMMAND_HELP") public void genericCommand(Player p) { SWUtils.giveItemToPlayer(p, new ItemStack(Material.DEBUG_STICK)); } diff --git a/BauSystem_Main/src/de/steamwar/bausystem/features/util/MaterialCommand.java b/BauSystem_Main/src/de/steamwar/bausystem/features/util/MaterialCommand.java index 8b466194..393367ed 100644 --- a/BauSystem_Main/src/de/steamwar/bausystem/features/util/MaterialCommand.java +++ b/BauSystem_Main/src/de/steamwar/bausystem/features/util/MaterialCommand.java @@ -108,7 +108,7 @@ public class MaterialCommand extends SWCommand implements Listener { public SWListInv.SWListEntry toSWItem(Player p) { List lore = new ArrayList<>(); - lore.add(BauSystem.MESSAGE.parse("MATERIAL_BLAST-RESISTANCE", p, blastResistance)); + lore.add(BauSystem.MESSAGE.parse("MATERIAL_BLAST_RESISTANCE", p, blastResistance)); lore.add(BauSystem.MESSAGE.parse(blastResistance > 9 ? "MATERIAL_TNT_UNBREAKABLE" : "MATERIAL_TNT_BREAKABLE", p)); lore.add(BauSystem.MESSAGE.parse("MATERIAL_HARDNESS", p, hardness)); if (transparent) { @@ -124,7 +124,7 @@ public class MaterialCommand extends SWCommand implements Listener { lore.add(BauSystem.MESSAGE.parse("MATERIAL_OCCLUDING", p)); } if (interacteable) { - lore.add(BauSystem.MESSAGE.parse("MATERIAL_INTERACT-ABLE", p)); + lore.add(BauSystem.MESSAGE.parse("MATERIAL_INTERACTABLE", p)); } if (flammable) { lore.add(BauSystem.MESSAGE.parse("MATERIAL_FLAMMABLE", p)); diff --git a/BauSystem_Main/src/de/steamwar/bausystem/features/util/NightVisionCommand.java b/BauSystem_Main/src/de/steamwar/bausystem/features/util/NightVisionCommand.java index 245d561a..f1178df1 100644 --- a/BauSystem_Main/src/de/steamwar/bausystem/features/util/NightVisionCommand.java +++ b/BauSystem_Main/src/de/steamwar/bausystem/features/util/NightVisionCommand.java @@ -39,10 +39,10 @@ public class NightVisionCommand extends SWCommand { public void genericCommand(Player p) { if (p.hasPotionEffect(PotionEffectType.NIGHT_VISION)) { p.removePotionEffect(PotionEffectType.NIGHT_VISION); - BauSystem.MESSAGE.sendPrefixless("NIGHT-VISION_OFF", p, ChatMessageType.ACTION_BAR); + BauSystem.MESSAGE.sendPrefixless("NIGHT_VISION_OFF", p, ChatMessageType.ACTION_BAR); return; } p.addPotionEffect(new PotionEffect(PotionEffectType.NIGHT_VISION, 1000000, 255, false, false)); - BauSystem.MESSAGE.sendPrefixless("NIGHT-VISION_ON", p, ChatMessageType.ACTION_BAR); + BauSystem.MESSAGE.sendPrefixless("NIGHT_VISION_ON", p, ChatMessageType.ACTION_BAR); } } \ No newline at end of file diff --git a/BauSystem_Main/src/de/steamwar/bausystem/features/util/items/DebugstickBauGuiItem.java b/BauSystem_Main/src/de/steamwar/bausystem/features/util/items/DebugstickBauGuiItem.java index 3202fe2d..d16a6577 100644 --- a/BauSystem_Main/src/de/steamwar/bausystem/features/util/items/DebugstickBauGuiItem.java +++ b/BauSystem_Main/src/de/steamwar/bausystem/features/util/items/DebugstickBauGuiItem.java @@ -21,7 +21,6 @@ package de.steamwar.bausystem.features.util.items; import de.steamwar.bausystem.BauSystem; import de.steamwar.bausystem.Permission; -import de.steamwar.bausystem.config.ColorConfig; import de.steamwar.bausystem.linkage.specific.BauGuiItem; import de.steamwar.bausystem.linkage.LinkageType; import de.steamwar.bausystem.linkage.Linked; @@ -40,7 +39,7 @@ public class DebugstickBauGuiItem extends BauGuiItem { @Override public ItemStack getItem(Player player) { - return new SWItem(Material.DEBUG_STICK, BauSystem.MESSAGE.parse("DEBUG-STICK_NAME", player)).getItemStack(); + return new SWItem(Material.DEBUG_STICK, BauSystem.MESSAGE.parse("DEBUG_STICK_NAME", player)).getItemStack(); } @Override diff --git a/BauSystem_Main/src/de/steamwar/bausystem/features/util/items/SkullBauGuiItem.java b/BauSystem_Main/src/de/steamwar/bausystem/features/util/items/SkullBauGuiItem.java index 228a4a7b..879a226e 100644 --- a/BauSystem_Main/src/de/steamwar/bausystem/features/util/items/SkullBauGuiItem.java +++ b/BauSystem_Main/src/de/steamwar/bausystem/features/util/items/SkullBauGuiItem.java @@ -47,7 +47,7 @@ public class SkullBauGuiItem extends BauGuiItem { @Override public boolean click(ClickType click, Player p) { p.closeInventory(); - SWAnvilInv inv = new SWAnvilInv(p, BauSystem.MESSAGE.parse("ANVIL-INV_NAME",p)); + SWAnvilInv inv = new SWAnvilInv(p, BauSystem.MESSAGE.parse("ANVIL_INV_NAME",p)); inv.setItem(Material.NAME_TAG); inv.setCallback(s -> p.performCommand("skull " + s)); inv.open(); diff --git a/BauSystem_Main/src/de/steamwar/bausystem/region/flags/flagvalues/ColorMode.java b/BauSystem_Main/src/de/steamwar/bausystem/region/flags/flagvalues/ColorMode.java index fac8b572..6902a2fb 100644 --- a/BauSystem_Main/src/de/steamwar/bausystem/region/flags/flagvalues/ColorMode.java +++ b/BauSystem_Main/src/de/steamwar/bausystem/region/flags/flagvalues/ColorMode.java @@ -30,12 +30,12 @@ public enum ColorMode implements Flag.Value { WHITE("FLAG_COLOR_WHITE", Color.WHITE), ORANGE("FLAG_COLOR_ORANGE", Color.ORANGE), MAGENTA("FLAG_COLOR_MAGENTA", Color.MAGENTA), - LIGHT_BLUE("FLAG_COLOR_LIGHT-BLUE", Color.LIGHT_BLUE), + LIGHT_BLUE("FLAG_COLOR_LIGHT_BLUE", Color.LIGHT_BLUE), YELLOW("FLAG_COLOR_YELLOW", Color.YELLOW), LIME("FLAG_COLOR_LIME", Color.LIME), PINK("FLAG_COLOR_PINK", Color.PINK), GRAY("FLAG_COLOR_GRAY", Color.GRAY), - LIGHT_GRAY("FLAG_COLOR_LIGHT-GRAY", Color.LIGHT_GRAY), + LIGHT_GRAY("FLAG_COLOR_LIGHT_GRAY", Color.LIGHT_GRAY), CYAN("FLAG_COLOR_CYAN", Color.CYAN), PURPLE("FLAG_COLOR_PURPLE", Color.PURPLE), BLUE("FLAG_COLOR_BLUE", Color.BLUE), diff --git a/BauSystem_Main/src/de/steamwar/bausystem/region/flags/flagvalues/TNTMode.java b/BauSystem_Main/src/de/steamwar/bausystem/region/flags/flagvalues/TNTMode.java index 63a865a7..f6f2706d 100644 --- a/BauSystem_Main/src/de/steamwar/bausystem/region/flags/flagvalues/TNTMode.java +++ b/BauSystem_Main/src/de/steamwar/bausystem/region/flags/flagvalues/TNTMode.java @@ -29,7 +29,7 @@ public enum TNTMode implements Flag.Value { ALLOW("FLAG_TNT_ALLOW"), DENY("FLAG_TNT_DENY"), - ONLY_TB("FLAG_TNT_ONLY-TB"); + ONLY_TB("FLAG_TNT_ONLY_TB"); private static TNTMode[] values; private final String chatValue; From ad8602873716c7bf9e2cd4056e0342903ab38813 Mon Sep 17 00:00:00 2001 From: yoyosource Date: Mon, 27 Dec 2021 16:10:06 +0100 Subject: [PATCH 30/34] Update build.gradle Signed-off-by: yoyosource --- build.gradle | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build.gradle b/build.gradle index d084a399..0392b342 100644 --- a/build.gradle +++ b/build.gradle @@ -150,7 +150,7 @@ private def await(Process proc) { } private def shell(String command) { - if (operatingSystem == "unix" && false) { + if (operatingSystem == "unix") { return ['bash', '-c', command].execute() } else { return ["cmd", "/c", command].execute() From fddd2e73e530eeff4e1ef7973d9163098f0c3f27 Mon Sep 17 00:00:00 2001 From: yoyosource Date: Mon, 27 Dec 2021 16:10:56 +0100 Subject: [PATCH 31/34] Update .gitignore Signed-off-by: yoyosource --- .gitignore | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.gitignore b/.gitignore index 174842a0..36e1257e 100644 --- a/.gitignore +++ b/.gitignore @@ -12,5 +12,4 @@ steamwar.properties *.iml # Other -lib -/BauSystem_Main/build.gradle \ No newline at end of file +lib \ No newline at end of file From 5ef84777981e84464392891112064f62d2425628 Mon Sep 17 00:00:00 2001 From: yoyosource Date: Mon, 27 Dec 2021 16:17:44 +0100 Subject: [PATCH 32/34] Fix stuff Signed-off-by: yoyosource --- .../steamwar/bausystem/features/bau/BauInfoBauGuiItem.java | 2 +- .../bausystem/features/util/items/NightVisionBauGuiItem.java | 3 +-- .../bausystem/features/util/items/SelectBauGuiItem.java | 5 ++--- 3 files changed, 4 insertions(+), 6 deletions(-) diff --git a/BauSystem_Main/src/de/steamwar/bausystem/features/bau/BauInfoBauGuiItem.java b/BauSystem_Main/src/de/steamwar/bausystem/features/bau/BauInfoBauGuiItem.java index dc2e7349..89c48648 100644 --- a/BauSystem_Main/src/de/steamwar/bausystem/features/bau/BauInfoBauGuiItem.java +++ b/BauSystem_Main/src/de/steamwar/bausystem/features/bau/BauInfoBauGuiItem.java @@ -55,7 +55,7 @@ public class BauInfoBauGuiItem extends BauGuiItem { } Flag.Value value = region.get(flag); if (value != null) { - stringList.add(BauSystem.MESSAGE.parse("BAU-INFO_ITEM_LORE_" + flag.name(), player, BauSystem.MESSAGE.parse(value.getChatValue(), player))); + stringList.add(BauSystem.MESSAGE.parse("BAU_INFO_ITEM_LORE_" + flag.name(), player, BauSystem.MESSAGE.parse(value.getChatValue(), player))); } } itemStack.setLore(stringList); diff --git a/BauSystem_Main/src/de/steamwar/bausystem/features/util/items/NightVisionBauGuiItem.java b/BauSystem_Main/src/de/steamwar/bausystem/features/util/items/NightVisionBauGuiItem.java index a49dde98..70c652ca 100644 --- a/BauSystem_Main/src/de/steamwar/bausystem/features/util/items/NightVisionBauGuiItem.java +++ b/BauSystem_Main/src/de/steamwar/bausystem/features/util/items/NightVisionBauGuiItem.java @@ -21,10 +21,9 @@ package de.steamwar.bausystem.features.util.items; import de.steamwar.bausystem.BauSystem; import de.steamwar.bausystem.Permission; -import de.steamwar.bausystem.config.ColorConfig; -import de.steamwar.bausystem.linkage.specific.BauGuiItem; import de.steamwar.bausystem.linkage.LinkageType; import de.steamwar.bausystem.linkage.Linked; +import de.steamwar.bausystem.linkage.specific.BauGuiItem; import de.steamwar.inventory.SWItem; import org.bukkit.Material; import org.bukkit.entity.Player; diff --git a/BauSystem_Main/src/de/steamwar/bausystem/features/util/items/SelectBauGuiItem.java b/BauSystem_Main/src/de/steamwar/bausystem/features/util/items/SelectBauGuiItem.java index 408a9399..37493ea0 100644 --- a/BauSystem_Main/src/de/steamwar/bausystem/features/util/items/SelectBauGuiItem.java +++ b/BauSystem_Main/src/de/steamwar/bausystem/features/util/items/SelectBauGuiItem.java @@ -21,10 +21,9 @@ package de.steamwar.bausystem.features.util.items; import de.steamwar.bausystem.BauSystem; import de.steamwar.bausystem.Permission; -import de.steamwar.bausystem.config.ColorConfig; -import de.steamwar.bausystem.linkage.specific.BauGuiItem; import de.steamwar.bausystem.linkage.LinkageType; import de.steamwar.bausystem.linkage.Linked; +import de.steamwar.bausystem.linkage.specific.BauGuiItem; import de.steamwar.bausystem.region.utils.RegionExtensionType; import de.steamwar.bausystem.region.utils.RegionType; import de.steamwar.inventory.SWInventory; @@ -67,7 +66,7 @@ public class SelectBauGuiItem extends BauGuiItem { @Override public ItemStack getItem(Player player) { LastSelect last = LAST_SELECT_MAP.getOrDefault(player, new LastSelect(RegionType.BUILD, RegionExtensionType.NORMAL)); - return new SWItem(Material.SCAFFOLDING, BauSystem.MESSAGE.parse("SELECT_ITEM_EXTENDED_EXTENSION",player), Arrays.asList(BauSystem.MESSAGE.parse("EXTENDED_EXTENSION", player) + last.toString(), BauSystem.MESSAGE.parse("RIGHT_CLICK", player)), false, clickType -> { + return new SWItem(Material.SCAFFOLDING, BauSystem.MESSAGE.parse("SELECT_ITEM_EXTENDED_EXTENSION", player), Arrays.asList(BauSystem.MESSAGE.parse("SELECT_ITEM_EXTENDED_EXTENSION", player) + last.toString(), BauSystem.MESSAGE.parse("SELECT_ITEM_RIGHT_CLICK", player)), false, clickType -> { }).getItemStack(); } From 2effb68852b562b068fe08bee63e070d005e7066 Mon Sep 17 00:00:00 2001 From: yoyosource Date: Mon, 27 Dec 2021 16:21:18 +0100 Subject: [PATCH 33/34] Fix SelectBauGuiItem Signed-off-by: yoyosource --- .../bausystem/features/util/items/SelectBauGuiItem.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/BauSystem_Main/src/de/steamwar/bausystem/features/util/items/SelectBauGuiItem.java b/BauSystem_Main/src/de/steamwar/bausystem/features/util/items/SelectBauGuiItem.java index 37493ea0..37ee3b95 100644 --- a/BauSystem_Main/src/de/steamwar/bausystem/features/util/items/SelectBauGuiItem.java +++ b/BauSystem_Main/src/de/steamwar/bausystem/features/util/items/SelectBauGuiItem.java @@ -66,7 +66,7 @@ public class SelectBauGuiItem extends BauGuiItem { @Override public ItemStack getItem(Player player) { LastSelect last = LAST_SELECT_MAP.getOrDefault(player, new LastSelect(RegionType.BUILD, RegionExtensionType.NORMAL)); - return new SWItem(Material.SCAFFOLDING, BauSystem.MESSAGE.parse("SELECT_ITEM_EXTENDED_EXTENSION", player), Arrays.asList(BauSystem.MESSAGE.parse("SELECT_ITEM_EXTENDED_EXTENSION", player) + last.toString(), BauSystem.MESSAGE.parse("SELECT_ITEM_RIGHT_CLICK", player)), false, clickType -> { + return new SWItem(Material.SCAFFOLDING, BauSystem.MESSAGE.parse("SELECT_ITEM_SELECT", player), Arrays.asList(BauSystem.MESSAGE.parse("SELECT_ITEM_AUSWAHL", player) + last.toString(), BauSystem.MESSAGE.parse("SELECT_ITEM_RIGHT_CLICK", player)), false, clickType -> { }).getItemStack(); } From fc339886d7f1159606bc24453fc5ec4d709e1ed9 Mon Sep 17 00:00:00 2001 From: yoyosource Date: Mon, 27 Dec 2021 16:32:13 +0100 Subject: [PATCH 34/34] Fix SelectBauGuiItem Signed-off-by: yoyosource --- BauSystem_Main/src/BauSystem.properties | 18 +++++++++--------- .../features/util/items/SelectBauGuiItem.java | 2 +- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/BauSystem_Main/src/BauSystem.properties b/BauSystem_Main/src/BauSystem.properties index 5c2e055d..c13df4e5 100644 --- a/BauSystem_Main/src/BauSystem.properties +++ b/BauSystem_Main/src/BauSystem.properties @@ -868,19 +868,19 @@ OTHER_WORLDSPAWN_HELP=§8/§eworldspawn §8-§e Teleportiere dich zum Spawn DEBUG_STICK_COMMAND_HELP=§8/§edebugstick §8-§7 Erhalte einen DebugStick DEBUG_STICK_NAME=§eDebugstick #Skull Gui -ANVIL_INV_NAME=Spieler name" +ANVIL_INV_NAME=Spieler name # StructureVoid STRUCTURE_VOID_COMMAND_HELP=§8/§estructureVoid §8-§7 Erhalte ein StructureVoid # NightVision NIGHT_VISION_COMMAND_HELP=§8/§enightvision §8-§7 Schalte Nightvision an oder aus. NIGHT_VISION_OFF=§eNightvision deaktiviert NIGHT_VISION_ON=§eNightvision aktiviert -NIGHT_VISION_ITEM_ON = &Nightvision: &eAktiviert -NIGHT_VISION_ITEM_OFF = &Nightvision: &eDeaktiviert +NIGHT_VISION_ITEM_ON = §Nightvision: §eAktiviert +NIGHT_VISION_ITEM_OFF = §Nightvision: §eDeaktiviert #Navigation Wand -NAVIGATION_WAND=&eNavigation Wand -NAVIGATION_WAND_LEFT_CLICK="&eLeft click: jump to location" -NAVIGATION_WAND_RIGHT_CLICK="&eRight click: pass through walls" +NAVIGATION_WAND=§eNavigation Wand +NAVIGATION_WAND_LEFT_CLICK=§eLeft click: jump to location +NAVIGATION_WAND_RIGHT_CLICK=§eRight click: pass through walls # Material MATERIAL_INV_NAME=§eMaterial {0}/{1} MATERIAL_SEARCH=§eSuchen @@ -1073,8 +1073,8 @@ SPEED_ITEM = §eGeschwindigkeit SPEED_ITEM_LORE = §7Aktuell: §e SPEED_TAB_NAME = Geschwindigkeit eingeben -WATER_SIGHT_ON = §7Wassersicht: &eAktiviert -WATER_SIGHT_OFF = §7Wassersicht: &eDeaktiviert +WATER_SIGHT_ON = §7Wassersicht: §eAktiviert +WATER_SIGHT_OFF = §7Wassersicht: §eDeaktiviert WORLDEDIT_WAND = WorldEdit Wand WORLDEDIT_LEFTCLICK = Left click: select pos #1 @@ -1095,7 +1095,7 @@ SELECT_ITEM_CHOOSE_SELECTION = Auswahl auswählen SELECT_ITEM_NORMAL_EXTENSION = §eNormal SELECT_ITEM_EXTENDED_EXTENSION= §eAusgefahren SELECT_ITEM_SELECT= §eSelect -SELECT_ITEM_AUSWAHL= §7Auswahl: §7 +SELECT_ITEM_AUSWAHL= §7Auswahl: §7{0} {1} SELECT_ITEM_RIGHT_CLICK=§7Rechtklick zum ändern SELECT_ITEM_BAURAHMEN=§eBaurahmen SELECT_ITEM_BAUPLATTFORM=§eBauplattform diff --git a/BauSystem_Main/src/de/steamwar/bausystem/features/util/items/SelectBauGuiItem.java b/BauSystem_Main/src/de/steamwar/bausystem/features/util/items/SelectBauGuiItem.java index 37ee3b95..4cc20aef 100644 --- a/BauSystem_Main/src/de/steamwar/bausystem/features/util/items/SelectBauGuiItem.java +++ b/BauSystem_Main/src/de/steamwar/bausystem/features/util/items/SelectBauGuiItem.java @@ -66,7 +66,7 @@ public class SelectBauGuiItem extends BauGuiItem { @Override public ItemStack getItem(Player player) { LastSelect last = LAST_SELECT_MAP.getOrDefault(player, new LastSelect(RegionType.BUILD, RegionExtensionType.NORMAL)); - return new SWItem(Material.SCAFFOLDING, BauSystem.MESSAGE.parse("SELECT_ITEM_SELECT", player), Arrays.asList(BauSystem.MESSAGE.parse("SELECT_ITEM_AUSWAHL", player) + last.toString(), BauSystem.MESSAGE.parse("SELECT_ITEM_RIGHT_CLICK", player)), false, clickType -> { + return new SWItem(Material.SCAFFOLDING, BauSystem.MESSAGE.parse("SELECT_ITEM_SELECT", player), Arrays.asList(BauSystem.MESSAGE.parse("SELECT_ITEM_AUSWAHL", player, BauSystem.MESSAGE.parse(last.type.getChatValue(), player), last.extensionType.name()), BauSystem.MESSAGE.parse("SELECT_ITEM_RIGHT_CLICK", player)), false, clickType -> { }).getItemStack(); }