UltraTools/src/net/mindoverflow/ultratools/Main.java

43 lines
1.5 KiB
Java

package net.mindoverflow.ultratools;
import net.mindoverflow.ultratools.commands.CommandInfo;
import net.mindoverflow.ultratools.commands.GetInventory;
import net.mindoverflow.ultratools.inventories.Inventories;
import net.mindoverflow.ultratools.listeners.PlayerJoinListener;
import org.bukkit.configuration.file.YamlConfiguration;
import org.bukkit.plugin.java.JavaPlugin;
import java.util.ArrayList;
import java.util.logging.Level;
import java.util.logging.Logger;
public class Main extends JavaPlugin
{
// Initializing needed variables.
public static double version = 0.4;
YamlConfiguration config;
private Logger logger = Logger.getLogger("Minecraft");
public static ArrayList<String> vanished = new ArrayList<String>();
// Method called when the plugin is being loaded.
@Override
public void onEnable() {
logger = getLogger();
logger.log(Level.INFO, "========= !ULTRATOOLS " + version + " ENABLED! =========");
getCommand("getinv").setExecutor(new GetInventory());
getCommand("ultratools").setExecutor(new CommandInfo());
getServer().getPluginManager().registerEvents(new Inventories(this), this);
getServer().getPluginManager().registerEvents(new PlayerJoinListener(this), this);
getServer().getPluginManager().registerEvents(new GetInventory(), this);
}
// Method called when the plugin is being unloaded.
@Override
public void onDisable() {
logger.log(Level.INFO, "========= !ULTRATOOLS " + version + " DISABLED! =========");
}
}