SteamWar/BauSystem
Archiviert
13
0

Add CommandRedstoneTester help message

Dieser Commit ist enthalten in:
yoyosource 2021-03-07 16:30:15 +01:00
Ursprung 4faede4abf
Commit d30a8ff4aa

Datei anzeigen

@ -19,6 +19,7 @@
package de.steamwar.bausystem.commands;
import de.steamwar.bausystem.BauSystem;
import de.steamwar.bausystem.PlayerUtils;
import de.steamwar.bausystem.world.RedstoneListener;
import org.bukkit.command.Command;
@ -29,10 +30,14 @@ import org.bukkit.entity.Player;
public class CommandRedstoneTester implements CommandExecutor {
@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))
return false;
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);
return false;
}