package pl.qotrek.terxan; import java.util.ArrayList; import java.util.UUID; import org.bukkit.Bukkit; import org.bukkit.plugin.java.JavaPlugin; import pl.qotrek.terxan.commands.AlertCommand; import pl.qotrek.terxan.commands.ChatCommand; import pl.qotrek.terxan.commands.FeedCommand; import pl.qotrek.terxan.commands.FlyCommand; import pl.qotrek.terxan.commands.GamemodeCommand; import pl.qotrek.terxan.commands.GmCommand; import pl.qotrek.terxan.commands.GodCommand; import pl.qotrek.terxan.commands.HealCommand; import pl.qotrek.terxan.commands.PomocCommand; import pl.qotrek.terxan.commands.SmsCommand; import pl.qotrek.terxan.commands.TpAllCommand; import pl.qotrek.terxan.commands.TpCommand; import pl.qotrek.terxan.commands.TpHereCommand; import pl.qotrek.terxan.commands.VipCommand; import pl.qotrek.terxan.commands.sVipCommand; import pl.qotrek.terxan.config.Config; import pl.qotrek.terxan.listeners.JoinQuitListener; import pl.qotrek.terxan.listeners.MotdListener; import pl.qotrek.terxan.listeners.PlayerListener; public class Main extends JavaPlugin { private static Main plugin; public ArrayList gods = new ArrayList(); public static Main getPlugin() { return plugin; } @Override public void onDisable() { getLogger().info("Deaktywacja pluginu TerXan-MineGlob by Qotrek"); } @Override public void onEnable() { getLogger().info("Uruchamianie pluginu TerXan by Qotrek"); getLogger().info("Wczytywanie configu"); saveDefaultConfig(); Config.reloadConfig(); getLogger().info("Wczytano config"); plugin = this; getLogger().info("Wczytywanie komend"); getCommand("chat").setExecutor(new ChatCommand()); getCommand("pomoc").setExecutor(new PomocCommand()); getCommand("vip").setExecutor(new VipCommand()); getCommand("svip").setExecutor(new sVipCommand()); getCommand("alert").setExecutor(new AlertCommand()); getCommand("gm").setExecutor(new GmCommand()); getCommand("gamemode").setExecutor(new GamemodeCommand()); getCommand("sms").setExecutor(new SmsCommand()); getCommand("fly").setExecutor(new FlyCommand()); getCommand("god").setExecutor(new GodCommand(this)); getCommand("heal").setExecutor(new HealCommand()); getCommand("feed").setExecutor(new FeedCommand()); getCommand("tp").setExecutor(new TpCommand()); getCommand("teleport").setExecutor(new TpCommand()); getCommand("tphere").setExecutor(new TpHereCommand()); getCommand("s").setExecutor(new TpHereCommand()); getCommand("tpall").setExecutor(new TpAllCommand()); getCommand("kick").setExecutor(new KickCommand()); getLogger().info("Wczytano komendy"); getLogger().info("Wczytytwanie eventow"); Bukkit.getServer().getPluginManager().registerEvents(new ChatCommand(), this); Bukkit.getServer().getPluginManager().registerEvents(new MotdListener(), this); Bukkit.getServer().getPluginManager().registerEvents(new JoinQuitListener(), this); Bukkit.getServer().getPluginManager().registerEvents(new PlayerListener(this), this); getLogger().info("Wczytano eventy"); getLogger().info("Plugin zostal pomyslnie wczytany"); } public void onLoad() { plugin = this; } }