package eu.univento.core.api; import org.bukkit.Bukkit; import org.bukkit.command.Command; import org.bukkit.command.CommandMap; import org.bukkit.command.CommandSender; import org.bukkit.plugin.java.JavaPlugin; import java.lang.reflect.Field; import java.util.ArrayList; import java.util.List; /** * @author PostCrafter * @see href http://postcrafter.de/viewtopic.php?f=15&t=143 * @param
main class */ public abstract class AutoCommand
extends Command {
private static String VERSION;
static {
String path = Bukkit.getServer().getClass().getPackage().getName();
AutoCommand.VERSION = path.substring(path.lastIndexOf(".") + 1, path.length());
System.out.println("[PostLib] AutoCommand hook for Bukkit " + AutoCommand.VERSION);
}
protected final P plugin;
protected final String command;
public AutoCommand(P plugin, String command, String description, String... aliases) {
super(command);
this.plugin = plugin;
this.command = command;
super.setDescription(description);
List