Advertisement
klutch2013

helloworld.java

Feb 12th, 2012
123
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.91 KB | None | 0 0
  1. package com.github.klutch2013.TestPlugin;
  2.  
  3. import java.util.logging.Logger;
  4.  
  5. import org.bukkit.plugin.PluginDescriptionFile;
  6. import org.bukkit.plugin.PluginManager;
  7. import org.bukkit.plugin.java.JavaPlugin;
  8.  
  9. public class helloworld extends JavaPlugin{
  10.    
  11.     public static helloworld plugin;
  12.     public final Logger logger = Logger.getLogger("Minecraft");
  13.     public final ServerChatPlayerListener playerListener = new ServerChatPlayerListener(this);
  14.    
  15.     @Override
  16.     public void onDisable() {
  17.         PluginDescriptionFile pdfFile = this.getDescription();
  18.         this.logger.info(pdfFile.getName() + " is now disabled. ");
  19.     }
  20.    
  21.     @Override
  22.     public void onEnable() {
  23.         PluginManager pm = getServer().getPluginManager();
  24.         pm.registerEvents(this.playerListener, this);
  25.         PluginDescriptionFile pdfFile = this.getDescription();
  26.         this.logger.info(pdfFile.getName() + " Version " + pdfFile.getVersion() + " is enabled" );
  27.        
  28.     }
  29. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement