SteamWar/BauSystem
Archiviert
13
0

RedstoneTester #202

Manuell gemergt
YoyoNow hat 29 Commits von RedstoneTester nach master 2021-04-01 18:21:40 +02:00 zusammengeführt
Nur Änderungen aus Commit d30a8ff4aa werden angezeigt - Alle Commits anzeigen

Datei anzeigen

@ -19,6 +19,7 @@
package de.steamwar.bausystem.commands; package de.steamwar.bausystem.commands;
import de.steamwar.bausystem.BauSystem;
import de.steamwar.bausystem.PlayerUtils; import de.steamwar.bausystem.PlayerUtils;
import de.steamwar.bausystem.world.RedstoneListener; import de.steamwar.bausystem.world.RedstoneListener;
import org.bukkit.command.Command; import org.bukkit.command.Command;
@ -29,10 +30,14 @@ import org.bukkit.entity.Player;
public class CommandRedstoneTester implements CommandExecutor { public class CommandRedstoneTester implements CommandExecutor {
@Override @Override
public boolean onCommand(CommandSender commandSender, Command command, String s, String[] strings) { public boolean onCommand(CommandSender commandSender, Command command, String s, String[] args) {
if (!(commandSender instanceof Player)) if (!(commandSender instanceof Player))
return false; return false;
Player player = (Player) commandSender; Player player = (Player) commandSender;
if (args.length != 0 && args[0].equalsIgnoreCase("help")) {
player.sendMessage(BauSystem.PREFIX + "Messe die Zeit zwischen der Aktivierung zweier Redstone Komponenten");
return false;
}
PlayerUtils.giveItemToPlayer(player, RedstoneListener.WAND); PlayerUtils.giveItemToPlayer(player, RedstoneListener.WAND);
return false; return false;
} }