Help, new plugin creator

Discussion in 'Plugin Development' started by lubby123, Aug 10, 2013.

Thread Status:
Not open for further replies.
  1. Offline

    lubby123

    Hey im a new plugin (soon to be) developer

    I put this in my plugin folder and it didnt read it, anyone help?
    -----------------------------------------------------------------------------
    Code:java
    1.  
    2. package me.lubby123.Test;
    3.  
    4. import java.util.logging.Logger;
    5.  
    6. import org.bukkit.ChatColor;
    7. import org.bukkit.command.Command;
    8. import org.bukkit.command.CommandSender;
    9. import org.bukkit.entity.Player;
    10. import org.bukkit.plugin.PluginDescriptionFile;
    11. import org.bukkit.plugin.java.JavaPlugin;
    12.  
    13. public class Test extends JavaPlugin{
    14. public final Logger logger = Logger.getLogger("Minecraft");
    15. public static Test plugin;
    16.  
    17. @Override
    18. public void onDisable() {
    19. PluginDescriptionFile pdfFile = this.getDescription();
    20. this.logger.info(pdfFile.getName() +" Has Been Disabled! ");
    21. }
    22.  
    23. @Override
    24. public void onEnable() {
    25. PluginDescriptionFile pdfFile = this.getDescription();
    26. this.logger.info(pdfFile.getName() + " Version " + pdfFile.getVersion() +" Has Been Enabled! ");
    27. }
    28.  
    29. public boolean onCommand(CommandSender sender, Command cmd, String commandLabel, String[] args){
    30. Player player = (Player) sender;
    31. if(commandLabel.equalsIgnoreCase("Tester")){
    32. player.sendMessage("Hello");
    33. }
    34. return false;
    35.  
    36. }
    37.  

    ?
     
  2. Offline

    DrTURTLE2

    Did you create a plugin.yml?
     
  3. Offline

    xxMOxMOxx

    I forget if your onCommand() method needs an @EventHandler
     
  4. xxMOxMOxx
    @EventHandler annotation is for events only ;)
     
  5. Offline

    lubby123

    @Assit what did i do wrong and how do i fix it?
     
  6. Offline

    Mig_B

    register the command in the plugin.yml
     
  7. Offline

    Deleted user

  8. Offline

    xTrollxDudex

    -___-
    lubby123
    Forgot return true
     
Thread Status:
Not open for further replies.

Share This Page