SteamWar/BauSystem2.0
Archiviert
12
0

Update Countingwand
Alle Prüfungen waren erfolgreich
SteamWarCI Build successful

Signed-off-by: yoyosource <yoyosource@nidido.de>
Dieser Commit ist enthalten in:
yoyosource 2021-12-30 23:16:59 +01:00
Ursprung 730a61e450
Commit 3e5d2dd3ec
2 geänderte Dateien mit 13 neuen und 4 gelöschten Zeilen

Datei anzeigen

@ -156,8 +156,9 @@ COUNTINGWAND_COMMAND_HELP = §8/§ecountingwand §8- §7Gibt dir en CountingWand
COUNTINGWAND_ITEM_NAME = §eZollstock COUNTINGWAND_ITEM_NAME = §eZollstock
COUNTINGWAND_ITEM_LORE1 = §eLinksklick §8- §7Setzt die 1. Position COUNTINGWAND_ITEM_LORE1 = §eLinksklick §8- §7Setzt die 1. Position
COUNTINGWAND_ITEM_LORE2 = §eRechtsklick §8- §7Setzt die 2. 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_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) 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} COUNTINGWAND_MESSAGE_DIMENSION = §e{0}§8, §e{1}§8, §e{2}
# Detonator # Detonator

Datei anzeigen

@ -70,10 +70,11 @@ public class Countingwand {
if (newPos) { if (newPos) {
String dimension = getDimensions(p, selection.getKey(), selection.getValue()); String dimension = getDimensions(p, selection.getKey(), selection.getValue());
String volume = getVolume(p, selection.getKey(), selection.getValue());
if (pos1) { 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 { } 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()); 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) { public String getDimensions(Player player, final Point point1, final Point point2) {
if (point1 == null || point2 == null) { if (point1 == null || point2 == null) {
return BauSystem.MESSAGE.parse("COUNTINGWAND_MESSAGE_DIMENSION", player, 0, 0, 0); return BauSystem.MESSAGE.parse("COUNTINGWAND_MESSAGE_DIMENSION", player, 0, 0, 0);