Advertisement
Guest User

Main

a guest
May 17th, 2013
151
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.83 KB | None | 0 0
  1.     private static Main instance;
  2.    
  3.     public static Economy econ = null;
  4.     public static final Logger log = Logger.getLogger("Minecraft");
  5.  
  6.     public void onEnable(){
  7.         instance = this;
  8.         log.info("Instance = this");
  9.        
  10.         if (!setupEconomy() ) {
  11.             log.severe(String.format("[%s] - Disabled due to no Vault dependency found!", getDescription().getName()));
  12.             getServer().getPluginManager().disablePlugin(this);
  13.             return;
  14.         }
  15.  
  16.         PluginManager pm = getServer().getPluginManager();
  17.         pm.registerEvents(this, this);
  18.         pm.registerEvents(new MenuListener(this), this);
  19.  
  20.         getConfig().options().copyDefaults(true);
  21.         saveConfig();
  22.        
  23.         Methods.createMenu();
  24.         Methods.meth().createSelectMenu();
  25.     }
  26.    
  27.     public void onDisable(){
  28.         instance = null;
  29.         log.info("Instance = null");
  30.     }
  31.    
  32.     public static Main inst(){
  33.         return instance;
  34.     }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement