/* * Copyright (c) 2017 univento.eu - All rights reserved * You are not allowed to use, distribute or modify this code */ 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.Collections; import java.util.List; /** * @author PostCrafter * @see "http://postcrafter.de/viewtopic.php?f=15&t=143" * @param
main class */ @Deprecated 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("AutoCommand hook for Bukkit " + AutoCommand.VERSION);
}
private final P plugin;
private 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