From 3e5d2dd3ec7a0984d168e3a1618e56e65e64ea5c Mon Sep 17 00:00:00 2001 From: yoyosource Date: Thu, 30 Dec 2021 23:16:59 +0100 Subject: [PATCH] Update Countingwand Signed-off-by: yoyosource --- BauSystem_Main/src/BauSystem.properties | 5 +++-- .../features/countingwand/Countingwand.java | 12 ++++++++++-- 2 files changed, 13 insertions(+), 4 deletions(-) diff --git a/BauSystem_Main/src/BauSystem.properties b/BauSystem_Main/src/BauSystem.properties index a748165a..81d8555f 100644 --- a/BauSystem_Main/src/BauSystem.properties +++ b/BauSystem_Main/src/BauSystem.properties @@ -156,8 +156,9 @@ 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_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_RCLICK = §7Erste Position bei: §8[§7{0}§8, §7{1}§8, §7{2}§8] ({3}§8) ({4}§8) +COUNTINGWAND_MESSAGE_LCLICK = §7Zweite Position bei: §8[§7{0}§8, §7{1}§8, §7{2}§8] ({3}§8) ({4}§8) +COUNTINGWAND_MESSAGE_VOLUME = §e{0} COUNTINGWAND_MESSAGE_DIMENSION = §e{0}§8, §e{1}§8, §e{2} # Detonator 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 e22fb958..b6f786dc 100644 --- a/BauSystem_Main/src/de/steamwar/bausystem/features/countingwand/Countingwand.java +++ b/BauSystem_Main/src/de/steamwar/bausystem/features/countingwand/Countingwand.java @@ -70,10 +70,11 @@ public class Countingwand { if (newPos) { String dimension = getDimensions(p, selection.getKey(), selection.getValue()); + String volume = getVolume(p, selection.getKey(), selection.getValue()); if (pos1) { - BauSystem.MESSAGE.send("COUNTINGWAND_MESSAGE_RCLICK", p, point.getX(), point.getY(), point.getZ(), dimension); + BauSystem.MESSAGE.send("COUNTINGWAND_MESSAGE_RCLICK", p, point.getX(), point.getY(), point.getZ(), dimension, volume); } else { - BauSystem.MESSAGE.send("COUNTINGWAND_MESSAGE_LCLICK", p, point.getX(), point.getY(), point.getZ(), dimension); + BauSystem.MESSAGE.send("COUNTINGWAND_MESSAGE_LCLICK", p, point.getX(), point.getY(), point.getZ(), dimension, volume); } } } @@ -82,6 +83,13 @@ public class Countingwand { selections.remove(p.getUniqueId().toString()); } + public String getVolume(Player player, final Point point1, final Point point2) { + if (point1 == null || point2 == null) { + return BauSystem.MESSAGE.parse("COUNTINGWAND_MESSAGE_VOLUME", player, 0); + } + return BauSystem.MESSAGE.parse("COUNTINGWAND_MESSAGE_VOLUME", player, getAmount(point1, point2)); + } + public String getDimensions(Player player, final Point point1, final Point point2) { if (point1 == null || point2 == null) { return BauSystem.MESSAGE.parse("COUNTINGWAND_MESSAGE_DIMENSION", player, 0, 0, 0);