How to get what a player has said?

Discussion in 'Plugin Development' started by SoTotallyRoary, Nov 4, 2014.

Thread Status:
Not open for further replies.
  1. I am wondering how do I get what a player has said? So then i can match it to a specific word or phrase

    Thanks
     
  2. Offline

    Funergy

    SoTotallyRoary Player async chat event. then do event.getMessage().<do stuff>
     
    SoTotallyRoary likes this.
  3. Offline

    mythbusterma

    SoTotallyRoary

    Listen for a PlayerChatEvent (or it's async counterpart)?
     
    SoTotallyRoary likes this.
  4. Offline

    Funergy

    SoTotallyRoary I think you should've looked on google. it really easy
    just type the following words
    "bukkit chat event" and it works like a charm :)
     
  5. Offline

    ChipDev

    if(event.getMessage().equals("hi") {
    //Message equals hi; Use ignoreCase if you want it to be non-case-sensititve.
    }
     
Thread Status:
Not open for further replies.

Share This Page