diff --git a/BauSystem_Main/src/BauSystem.properties b/BauSystem_Main/src/BauSystem.properties index f4fb2121..19501886 100644 --- a/BauSystem_Main/src/BauSystem.properties +++ b/BauSystem_Main/src/BauSystem.properties @@ -1244,6 +1244,9 @@ SELECT_ITEM_TESTBLOCK=§eDummy CHESTFILLER_FILLED = §eChest filled CHESTFILLER_COUNT = §7{0}§8: §e§l{1} +PISTON_HELP_1 = §7Right click on piston with a slime ball to calculate the moved blocks. +PISTON_HELP_2 = §7Count is red, if one unmoveable block is present. +PISTON_HELP_3 = §7Count is yellow, if too many blocks are present. PISTON_INFO = §7Moved Blocks {0}{1}§8/§712 # Warp diff --git a/BauSystem_Main/src/BauSystem_de.properties b/BauSystem_Main/src/BauSystem_de.properties index 1d10d0c6..65b2a5f7 100644 --- a/BauSystem_Main/src/BauSystem_de.properties +++ b/BauSystem_Main/src/BauSystem_de.properties @@ -1223,6 +1223,9 @@ SELECT_ITEM_TESTBLOCK=§eTestblock CHESTFILLER_FILLED = §eKiste gefüllt +PISTON_HELP_1 = §7Rechts Klick auf Piston mit einem Slime Ball berechnet dir die bewegten Blöcke. +PISTON_HELP_2 = §7Die Anzahl ist Rot, wenn ein unmovable Block vorhanden ist. +PISTON_HELP_3 = §7Die Anzahl ist Gelb, wenn zu viele Blöcke vorhanden sind. PISTON_INFO = §7Bewegte Blöcke {0}{1}§8/§712 # Warp diff --git a/BauSystem_Main/src/de/steamwar/bausystem/features/util/PistonCalculatorCommand.java b/BauSystem_Main/src/de/steamwar/bausystem/features/util/PistonCalculatorCommand.java new file mode 100644 index 00000000..1ededcee --- /dev/null +++ b/BauSystem_Main/src/de/steamwar/bausystem/features/util/PistonCalculatorCommand.java @@ -0,0 +1,41 @@ +/* + * This file is a part of the SteamWar software. + * + * Copyright (C) 2022 SteamWar.de-Serverteam + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ + +package de.steamwar.bausystem.features.util; + +import de.steamwar.bausystem.BauSystem; +import de.steamwar.bausystem.linkage.LinkageType; +import de.steamwar.bausystem.linkage.Linked; +import de.steamwar.command.SWCommand; +import org.bukkit.entity.Player; + +@Linked(LinkageType.COMMAND) +public class PistonCalculatorCommand extends SWCommand { + + public PistonCalculatorCommand() { + super("piston", "pistoncalculator", "pistoncalc"); + } + + @Register + public void help(Player player) { + BauSystem.MESSAGE.send("PISTON_HELP_1", player); + BauSystem.MESSAGE.send("PISTON_HELP_2", player); + BauSystem.MESSAGE.send("PISTON_HELP_3", player); + } +}