Advertisement
klutch2013

My First Bukkit Plugin

Feb 10th, 2012
170
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 1.20 KB | None | 0 0
  1. //Now i Fixed Everything that said this.Logger to this.logger
  2. //now i have just a 3 errors left
  3. //this is the Errors on helloworld.java
  4. //Image: http://dl.dropbox.com/u/3104034/almostthere%21.png
  5. //Code:
  6. package com.github.klutch2013.TestPlugin;
  7.  
  8. import java.util.logging.Logger;
  9.  
  10. import org.bukkit.event.Event;
  11. import org.bukkit.plugin.PluginDescriptionFile;
  12. import org.bukkit.plugin.PluginManager;
  13. import org.bukkit.plugin.java.JavaPlugin;
  14.  
  15. public class helloworld extends JavaPlugin{
  16.    
  17.     public static helloworld plugin;
  18.     public final Logger logger = Logger.getLogger("Minecraft");
  19.     public final ServerChatPlayerListener playerListener = new ServerChatPlayerListener(this);
  20.    
  21.     @Override
  22.     public void onDisable() {
  23.         PluginDescriptionFile pdfFile = this.getDescription();
  24.         this.logger.info(pdfFile.getName() + " is now disabled. ");
  25.     }
  26.    
  27.     @Override
  28.     public void onEnable() {
  29.         PluginManager pm = getServer().getPluginManager();
  30.         pm.registerEvents(this.playerListener, this);
  31.         PluginDescriptionFile pdfFile = this.getDescription();
  32.         this.logger.info(pdfFile.getName() + " Version " + pdfFile.getVersion() + " is enabled" );
  33.        
  34.     }
  35. }
  36.  
  37. //The ServerChatPlayerListener.java file has no errors now.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement