Advertisement
Guest User

Untitled

a guest
Jul 6th, 2015
27
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.19 KB | None | 0 0
  1. package me.bladianyt.core;
  2.  
  3. import me.bladianyt.keys.KeyManager;
  4. import me.bladianyt.keys.command.KeyCommand;
  5. import me.bladianyt.keys.config.KeyConfig;
  6. import org.bukkit.plugin.java.JavaPlugin;
  7.  
  8. import java.io.IOException;
  9.  
  10. /**
  11. * Created by BladianYT. By seeing this you have agreed to not copy
  12. * or use the code, which are you viewing unless you have been granted permission
  13. * by the developer.
  14. */
  15.  
  16. public class Core extends JavaPlugin {
  17.  
  18. private static Core instance;
  19.  
  20. public static Core getInstance() {
  21. if (instance == null) {
  22. instance = new Core();
  23. }
  24. return instance;
  25. }
  26.  
  27. public Core() {
  28. instance = this;
  29. }
  30.  
  31. @Override
  32. public void onEnable() {
  33.  
  34. saveDefaultConfig();
  35.  
  36. try {
  37. KeyConfig.getInstance().createKeyConfig();
  38. } catch (IOException e) {
  39. e.printStackTrace();
  40. }
  41.  
  42. KeyConfig.getInstance().saveKeyConfig();
  43.  
  44. KeyManager.getInstance().loadKeys();
  45.  
  46. getCommand("givekey").setExecutor(new KeyCommand());
  47. }
  48.  
  49. @Override
  50. public void onDisable() {
  51.  
  52. KeyConfig.getInstance().saveKeyConfig();
  53.  
  54. }
  55. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement