"Unknown Console Command" showing after using commands?

Discussion in 'Plugin Development' started by bombshell93, Apr 26, 2011.

Thread Status:
Not open for further replies.
  1. I've just finished my permissions plugin for a server. It all works fine except every time I use a command in game it shows "Unknown console command. type "help" for help." twice in the chat box.
    I'm not sure why this is, it seems like something that would be a common annoyance, so I did google the problem before posting this. Sadly the results were mostly unrelated.

    Could someone help me fix this?
    Thanks in advanced,
    Bombshell.
     
  2. 1) Please post your source code.
    2) Check your plugin.yml is configured properly.
     
  3. okk
    Here is my entire source code.

    Code:
     -snipped-
    
    I will repost it should I need more help
     
  4. Offline

    Sammy

    Code:
    onPlayerCommandPreprocess(PlayerCommandPreprocessEvent event)
    Dont use this use OnCommand

    And you need to register the commands on yml file like this:
    Code:
    commands:
      youcmnd:
        description: blabla
        usage: |
               /<command> - Mycomnd makes cake
     
  5. oh ok thanks :D
    why shouldn't I use on Command? is there a difference in performance?
     
  6. Offline

    Sammy

    Well the rule of thumb with onPlayerCommandPreprocess is: If you don't know why you need it just use onCommand
    I have been doing plugins for a while and never felt the need of using it to :)

    From the javadoc you get this:

     
Thread Status:
Not open for further replies.

Share This Page