Solved Cancelling a command

Discussion in 'Plugin Development' started by Brahhh, Dec 13, 2013.

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

    Brahhh

    I'm new to Java. I can't seem to figure out what you would do to cancel a certain command if a player entered it.


    Say a play enters /help I would want it to basically cancel the command.
     
  2. Offline

    Aperx

    What would the /help do? You shouldn't have to cancel a command, unless it's executing a runnable or something. Unless you want the command to be toggable?
    Like: /v to vanish
    /v to unvarnished, if you are already vanished
     
  3. Offline

    Harmings

    Brahhh
    Use the PlayerCommandPreprocessEvent, check if the command is /help, if it is then cancel the event
     
  4. Offline

    Brahhh


    Here's what I mean.

    1. Someone puts in the command /hi
    2. When they execute the command they don't receive anything back as if they never executed the command
     
  5. Offline

    AoH_Ruthless

    Brahhh
    This is very easy and this should not be asked. Learn the fundamentals of Java before working with 3rd party API's. That is all I have to say on the matter.
     
  6. Offline

    Brahhh

    I got it.
     
  7. Offline

    AoH_Ruthless

    Brahhh
    Awesome, please set your thread to solved :)
     
Thread Status:
Not open for further replies.

Share This Page