From 63c21241b2e7c26347cc3f2acbd556b1dee4a82f Mon Sep 17 00:00:00 2001 From: zOnlyKroks Date: Mon, 27 Dec 2021 14:01:18 +0100 Subject: [PATCH 1/3] 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 c5e6c775c3222eddcf23be3413575528431bc610 Mon Sep 17 00:00:00 2001 From: zOnlyKroks Date: Mon, 27 Dec 2021 14:01:44 +0100 Subject: [PATCH 2/3] 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 3/3] 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();