Advertisement
Guest User

Untitled

a guest
Aug 23rd, 2014
246
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.77 KB | None | 0 0
  1.    
  2.     @Override
  3.     public void onEnable(){
  4.         commands = new Commands();
  5.         plugin = this;
  6.         log = plugin.getLogger();
  7.        
  8.         cfgFile = new File(getDataFolder(), "Config.yml");
  9.        
  10.         try {
  11.              firstRun();
  12.          } catch (Exception e) {
  13.              e.printStackTrace();
  14.          }
  15.  
  16.         config = new YamlConfiguration();
  17.         reloadYAMLs();
  18.        
  19.         getCommand("rank").setExecutor(commands);      
  20.  
  21.        
  22.         mysqlManager = new MysqlManager(this);
  23.        
  24.         try {
  25.             mysqlManager.setupDB();
  26.         } catch (ClassNotFoundException e) {
  27.             // TODO Auto-generated catch block
  28.             e.printStackTrace();
  29.         } catch (SQLException e) {
  30.             // TODO Auto-generated catch block
  31.             e.printStackTrace();
  32.         }
  33.        
  34.         Bukkit.getPluginManager().registerEvents(new PlayerJoinListener(),
  35.                 this);
  36.        
  37.     }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement