Advertisement
maartenvr98

Untitled

Jul 26th, 2018
67
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.89 KB | None | 0 0
  1. public class Main extends JavaPlugin {
  2.  
  3. private FileConfiguration config;
  4. private Connect connection;
  5.  
  6. /**
  7. * Plugin enabled
  8. * Create config with defaults
  9. * Register events
  10. */
  11. @Override
  12. public void onEnable() {
  13. config.addDefault("enabled", true);
  14. config.addDefault("url", "http://www.example.com");
  15. config.addDefault("key" , "api_key");
  16. config.options().copyDefaults(true);
  17. saveConfig();
  18.  
  19. connection = new Connect();
  20.  
  21. this.getServer().getPluginManager().registerEvents(new Join(), this);
  22. this.getServer().getPluginManager().registerEvents(new Leave(), this);
  23. this.getCommand("mcstaff").setExecutor(new Commands());
  24. }
  25.  
  26. /**
  27. * Plugin disabled
  28. */
  29. @Override
  30. public void onDisable() {
  31. System.out.println("Mcstaff plugin disabled");
  32. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement