From 46678aead5bd00d97a2b19d7473853a667862446 Mon Sep 17 00:00:00 2001 From: yoyosource Date: Mon, 27 Dec 2021 13:54:29 +0100 Subject: [PATCH 1/4] 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 2/4] 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 3/4] 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 bb35ddba569cd96a6455d5bc22ca4ca2a52da8a5 Mon Sep 17 00:00:00 2001 From: yoyosource Date: Mon, 27 Dec 2021 14:01:20 +0100 Subject: [PATCH 4/4] 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)); }