org.bukkit.command.defaults.TestForCommand Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of chest-server Show documentation
Show all versions of chest-server Show documentation
A spigot fork to kotlin structure and news.
The newest version!
package org.bukkit.command.defaults;
import org.bukkit.ChatColor;
import org.bukkit.command.CommandSender;
@Deprecated
public class TestForCommand extends VanillaCommand {
public TestForCommand() {
super("testfor");
this.description = "Tests whether a specifed player is online";
this.usageMessage = "/testfor ";
this.setPermission("bukkit.command.testfor");
}
@Override
public boolean execute(CommandSender sender, String currentAlias, String[] args) {
if (!testPermission(sender)) return true;
if (args.length < 1) {
sender.sendMessage(ChatColor.RED + "Usage: " + usageMessage);
return false;
}
sender.sendMessage(ChatColor.RED + "/testfor is only usable by commandblocks with analog output.");
return true;
}
// Spigot Start
@Override
public java.util.List tabComplete(CommandSender sender, String alias, String[] args) throws IllegalArgumentException {
if (args.length == 0) {
return super.tabComplete(sender, alias, args);
}
return java.util.Collections.emptyList();
}
// Spigot End
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy