Not sure how to explain this error...

Discussion in 'Plugin Development' started by Blingdaddy1, Jan 27, 2014.

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

    Blingdaddy1

    So, this is what happens when I do /? and then my plugin name:
    [​IMG]

    and heres my code:
    Code:java
    1. package me.Bling.TeamAFKHub;
    2.  
    3. import net.minecraft.server.v1_7_R1.EntityPlayer;
    4.  
    5. import org.bukkit.Bukkit;
    6. import org.bukkit.ChatColor;
    7. import org.bukkit.command.Command;
    8. import org.bukkit.command.CommandSender;
    9. import org.bukkit.craftbukkit.v1_7_R1.entity.CraftPlayer;
    10. import org.bukkit.entity.Player;
    11. import org.bukkit.plugin.java.JavaPlugin;
    12.  
    13. public class Main extends JavaPlugin {
    14.  
    15. public void onEnable() {
    16. Bukkit.getServer().getLogger().info("TeamAFK Server is now starting");
    17.  
    18. }
    19.  
    20. public void onDisable() {
    21. Bukkit.getServer().getLogger().info("TeaMAFK Server is now stopping!");
    22.  
    23. }
    24.  
    25. String prefix = ChatColor.AQUA + "[" + ChatColor.GOLD + "TeamAFK" + ChatColor.AQUA + "]";
    26. @Override
    27. public boolean onCommand(CommandSender sender, Command cmd, String label, String[] args) {
    28. Player player = (Player) sender;
    29. if (cmd.getName().equalsIgnoreCase("gf")) {
    30. if (args.length == 0) {
    31. player.sendMessage(prefix + ChatColor.GREEN + " Boop! You're fixed! I guess that WD-40 was some high quality stuff.");
    32. }
    33. else if (args.length == 1) {
    34. player.sendMessage(prefix + ChatColor.GREEN + " Too many arguments.");
    35. }
    36. return true;
    37. }
    38. if (cmd.getName().equalsIgnoreCase("pvp")) {
    39. if (args.length == 0) {
    40. player.performCommand("server pvp");
    41. }
    42. else if (args.length == 1) {
    43. player.sendMessage(prefix + ChatColor.GREEN + " Too many arguments.");
    44. }
    45. }
    46. if (cmd.getName().equalsIgnoreCase("info")) {
    47. if (args.length == 0) {
    48. CraftPlayer cp = (CraftPlayer) sender;
    49. EntityPlayer ep = cp.getHandle();
    50. player.sendMessage(ChatColor.AQUA + "[" + ChatColor.GOLD + "TeamAFK" + ChatColor.AQUA + "]" + ChatColor.GREEN + " Server: " + ChatColor.RED + " TeamAFK");
    51. player.sendMessage(ChatColor.AQUA + "[" + ChatColor.GOLD + "TeamAFK" + ChatColor.AQUA + "]" + ChatColor.GREEN + " Address: " + ChatColor.RED + " TeamAFK.tk");
    52. player.sendMessage(ChatColor.AQUA + "[" + ChatColor.GOLD + "TeamAFK" + ChatColor.AQUA + "]" + ChatColor.GREEN + " Your Ping: " + ChatColor.RED + ep.ping);
    53. player.sendMessage(ChatColor.AQUA + "[" + ChatColor.GOLD + "TeamAFK" + ChatColor.AQUA + "]" + ChatColor.GREEN + " MOTD: " + ChatColor.RED + Bukkit.getMotd());
    54. player.sendMessage(ChatColor.AQUA + "[" + ChatColor.GOLD + "TeamAFK" + ChatColor.AQUA + "]" + ChatColor.GREEN + " Player Amount: " + ChatColor.RED + Bukkit.getOnlinePlayers().length + ChatColor.GREEN + " | " + ChatColor.RED + Bukkit.getMaxPlayers());
    55. }
    56. return true;
    57. }
    58. return true;
    59. }
    60.  
    61. }
    62.  


    And heres the plugin.yml:
    Code:
    name: TeamAFK Hub
    version: 1.0
    description: This is the Hub Plugin for the Team AFK
    author: Blingdaddy1
     
    main: me.Bling.TeamAFKHub.Main
     
     
    commands:
      info:
        description: Info command
        usage: You made an uh oh! The command is /<command> you derp!
      gf:
        description: Gf command
        usage: You made an uh oh! The command is /<command> you derp!
      pvp:
        description: Pvp command
        usage: you made an uh oh! The command is /<command> you derp!
    What could the error be? :eek:

    Also, no stacktraces in console.
     
  2. Offline

    igwb

  3. Offline

    Blingdaddy1

    igwb Well, this is how I've always done my plugins, and they've worked.. but this one is different. They're registered in the plugin.yml.
     
  4. Offline

    Garris0n

    Try removing the space in the name, see what that does.
     
  5. Offline

    Blingdaddy1

  6. Offline

    Garris0n

    Uh, is there another plugin taking up the /hub and /info commands?
     
  7. Offline

    Blingdaddy1

    Nope. I also removed the /info command, reuploaded the plugin, and the freaking command says it's still there. I don't even.
     
  8. Offline

    AoH_Ruthless

    Blingdaddy1
    What other plugins do you have? Remove all other plugins from the server if you have not done so already... I think what you are seeing occurs when two plugins have the same command.
     
  9. Offline

    Blingdaddy1

  10. Offline

    sockmonkey1

    Did you remove it from the plugin.yml?
     
  11. Offline

    Garris0n

    Tag/quote people you're responding to. Anyway, is it the only plugin on the server?
     
  12. Offline

    Blingdaddy1

    Yes, and It's removed from the plugin.yml
     
  13. Offline

    Garris0n

    Is that the only class?
     
  14. Offline

    Blingdaddy1

    There is one more, a listener class, but that only has to do with a launchpad.
     
Thread Status:
Not open for further replies.

Share This Page