Getting command that a player sends.

Discussion in 'Plugin Development' started by ImPhantom, Mar 24, 2014.

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

    ImPhantom

    Now, I'm not too sure if this is possible or not but. I want to be able to see every command that is being typed on my server. Kinda like in the console where it says "_imPhantom issued server command: /help" but have that broadcasted to me. Is there any way of doing this?
     
  2. Offline

    Stoux

    ImPhantom Yep. Check out PlayerCommandPreprocessEvent, it will be called before the command is executed.
    Just listen to the Event, take the player & the command/message from the event, and send it to yourself.
     
  3. Offline

    ImPhantom

    Stoux
    Thank you! I had a feeling there was an event. Im not able to access the JavaDocs at the moment cause im on my phone. So thank you very much.
     
Thread Status:
Not open for further replies.

Share This Page