Help with command.

Discussion in 'Plugin Development' started by tooncool64, May 6, 2014.

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

    tooncool64

    My plugin loads fine, when i issue the command /hello, all that comes up is /hello.
    And when my plugin is enabled, it automatically disables!
    Here is my .class file
    Code:java
    1. ackage name.testplugin;
    2.  
    3. import org.bukkit.plugin.java.JavaPlugin;
    4. import org.bukkit.ChatColor;
    5. import org.bukkit.entity.Player;
    6. import org.bukkit.command.Command;
    7. import org.bukkit.command.CommandSender;
    8. import org.bukkit.event.Listener;
    9.  
    10. public class Main extends JavaPlugin{
    11.  
    12. public void onEnable(){
    13. getLogger().info("Enabled!");
    14. }
    15.  
    16. public void onDisable(){
    17. getLogger().info("Disabled!");
    18. }
    19. public boolean onCommand(CommandSender sender, Command cmd, String label, String[] args) {
    20. Player player = (Player) sender;
    21. if(cmd.getName().equalsIgnoreCase("hello")){
    22. player.sendMessage(ChatColor.AQUA + "Hello Minecraft!");
    23. }
    24. return true;
    25. }
    26. }
     
  2. Offline

    minoneer

    Hello,

    can you show us the server log from startup to where your plugin "disables automatically" ?
     
Thread Status:
Not open for further replies.

Share This Page