From 851f9411ebb3cbac2e2e6cf07ce425e56a4c2624 Mon Sep 17 00:00:00 2001 From: zOnlyKroks Date: Mon, 27 Dec 2021 15:50:14 +0100 Subject: [PATCH] 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();