Guest User

Untitled

a guest
Dec 14th, 2018
100
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.27 KB | None | 0 0
  1. package me.lookatmejwn.goldenidea;
  2.  
  3. import java.util.logging.Logger;
  4. import org.bukkit.Server;
  5. import org.bukkit.event.Event.Priority;
  6. import org.bukkit.event.Event;
  7. import org.bukkit.plugin.Plugin;
  8. import org.bukkit.plugin.PluginDescriptionFile;
  9. import org.bukkit.plugin.java.JavaPlugin;
  10.  
  11. public class main extends JavaPlugin {
  12. public final GoldenIdeaPlayerListener listener = new GoldenIdeaPlayerListener();
  13. public static Logger log;
  14. public static Server server;
  15. public static Plugin instance;
  16. public static PluginDescriptionFile description;
  17.  
  18.  
  19.  
  20. public void onEnable(){
  21. log = Logger.getLogger("Minecraft");
  22. server = this.getServer();
  23. description = this.getDescription();
  24. instance = this;
  25. getServer().getPluginManager().registerEvent(Event.Type.PLAYER_MOVE, listener, Priority.Monitor, this);
  26. PluginDescriptionFile pdfFile = this.getDescription();
  27. log.info( pdfFile.getName() + " version " + pdfFile.getVersion() + " is Enabled!" );
  28. }
  29.  
  30. public void onDisable(){
  31. getServer().getPluginManager().registerEvent(Event.Type.PLAYER_MOVE, listener, Priority.Monitor, this);
  32. PluginDescriptionFile pdfFile = this.getDescription();
  33. log.info( pdfFile.getName() + " version " + pdfFile.getVersion() + " is Disabled!" );
  34. }
  35. }
Add Comment
Please, Sign In to add comment