getPluginCommand(String arg0) returns null

Discussion in 'Plugin Development' started by CoderMusgrove, May 25, 2014.

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

    CoderMusgrove

    I'm using a PlayerCommandPreprocessEvent for handling some commands, and to make a custom message for if the command isn't found (or if they have no permission so it looks like it's an unknown command, lol) and no matter what, Bukkit.getPluginCommand(String arg0) will return null.

    I have tested this with two separate commands, and tested if they were null:

    Code:
    PluginCommand cmd = Bukkit.getPluginCommand("help");
    null: true
    // different test
    PluginCommand cmd = Bukkit.getPluginCommand("/help");
    null: true
    Why is it always returning null? the help command is a command, and one of those ways should process correctly to be a command.
     
Thread Status:
Not open for further replies.

Share This Page