Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package ga.thedag.zplugin.main;
- import ga.thedag.zplugin.commands.Base;
- import ga.thedag.zplugin.commands.fly.Fly;
- import ga.thedag.zplugin.commands.gamemode.Adventure;
- import ga.thedag.zplugin.commands.gamemode.Creative;
- import ga.thedag.zplugin.commands.gamemode.Survival;
- import ga.thedag.zplugin.commands.health.Heal;
- import ga.thedag.zplugin.commands.health.Hurt;
- import ga.thedag.zplugin.commands.home.Delhome;
- import ga.thedag.zplugin.commands.home.Home;
- import ga.thedag.zplugin.commands.home.Sethome;
- import ga.thedag.zplugin.commands.hunger.Feed;
- import ga.thedag.zplugin.commands.hunger.Starve;
- import ga.thedag.zplugin.commands.warp.Delwarp;
- import ga.thedag.zplugin.commands.warp.Setwarp;
- import ga.thedag.zplugin.commands.warp.Warp;
- import ga.thedag.zplugin.config.Config;
- import ga.thedag.zplugin.config.ConfigManager;
- import ga.thedag.zplugin.configs.Ranks;
- import ga.thedag.zplugin.events.PlayerChatEvent;
- import org.bukkit.plugin.PluginManager;
- import org.bukkit.plugin.java.JavaPlugin;
- public class Main extends JavaPlugin {
- public Config homeConf;
- public Config warpConf;
- public Config rankConf;
- public Config playerConf;
- ConfigManager confManager;
- PluginManager pm = getServer().getPluginManager();
- Ranks ranks = new Ranks(this);
- @Override
- public void onEnable() {
- confManager = new ConfigManager(this);
- homeConf = confManager.getNewConfig("homes.yml");
- warpConf = confManager.getNewConfig("warps.yml");
- rankConf = confManager.getNewConfig("/ranks/ranks.yml");
- playerConf = confManager.getNewConfig("/ranks/players.yml");
- getCommand("zplugin").setExecutor(new Base(this));
- getCommand("sethome").setExecutor(new Sethome(this));
- getCommand("home").setExecutor(new Home(this));
- getCommand("delhome").setExecutor(new Delhome(this));
- getCommand("setwarp").setExecutor(new Setwarp(this));
- getCommand("warp").setExecutor(new Warp(this));
- getCommand("delwarp").setExecutor(new Delwarp(this));
- getCommand("adventure").setExecutor(new Adventure(this));
- getCommand("survival").setExecutor(new Survival(this));
- getCommand("creative").setExecutor(new Creative(this));
- getCommand("fly").setExecutor(new Fly(this));;
- getCommand("heal").setExecutor(new Heal(this));
- getCommand("feed").setExecutor(new Feed(this));
- getCommand("hurt").setExecutor(new Hurt(this));
- getCommand("starve").setExecutor(new Starve(this));
- pm.registerEvents(new PlayerChatEvent(), this);
- ranks.makeConf();
- }
- @Override
- public void onDisable() {
- homeConf.saveConfig();
- warpConf.saveConfig();
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement