From 6c44331947f30acf70151a26ea7bbc5ec7808751 Mon Sep 17 00:00:00 2001 From: zOnlyKroks Date: Mon, 27 Dec 2021 13:38:34 +0100 Subject: [PATCH] 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;