Advertisement
Guest User

Untitled

a guest
Dec 31st, 2014
213
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.64 KB | None | 0 0
  1. package me.mrson.McEconPlus;
  2.  
  3. import me.mrson.McEconPlus.Commands.MCEP_Econ;
  4. import me.mrson.McEconPlus.Commands.MCEP_Pay;
  5. import me.mrson.McEconPlus.Commands.MCEP_Sell;
  6. import me.mrson.McEconPlus.Events.MCEP_CreatePlayers;
  7. import me.mrson.McEconPlus.Utils.MCEP_Config;
  8. import me.mrson.McEconPlus.Utils.MCEP_Players;
  9. import org.bukkit.Bukkit;
  10. import org.bukkit.configuration.file.FileConfiguration;
  11. import org.bukkit.event.Listener;
  12. import org.bukkit.plugin.Plugin;
  13. import org.bukkit.plugin.java.JavaPlugin;
  14.  
  15. import java.io.UnsupportedEncodingException;
  16. import java.util.logging.Level;
  17.  
  18. /**
  19. * Created by Dominic on 12/23/2014.
  20. */
  21. public class MCEP_Base extends JavaPlugin{
  22. private static Plugin plugin;
  23. private static MCEP_Config config;
  24. private static MCEP_Players players;
  25.  
  26.  
  27. public void onEnable(){
  28. plugin = this;
  29.  
  30. //Logger
  31. this.getLogger().log(Level.FINEST, "[McEcon+] Enabling.");
  32.  
  33. //Commands
  34. getCommand("econ").setExecutor(new MCEP_Econ());
  35. getCommand("pay").setExecutor(new MCEP_Pay());
  36. getCommand("sell").setExecutor(new MCEP_Sell());
  37.  
  38. //Events
  39. config.getCustomConfig();
  40. players.getPlayersConfig();
  41.  
  42. this.registerEvent(this, new MCEP_CreatePlayers());
  43. }
  44.  
  45. public void onDisable(){
  46. plugin = null;
  47. }
  48.  
  49. public static void registerEvent(Plugin plugin, Listener... listeners){
  50. for(Listener listener : listeners){
  51. Bukkit.getServer().getPluginManager().registerEvents(listener, plugin);
  52. }
  53. }
  54.  
  55. public static Plugin getPlugin() {
  56. return plugin;
  57. }
  58. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement