Chatbox Message Grab

Discussion in 'Plugin Development' started by funstein, Sep 1, 2011.

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

    funstein

    Hello everyone,
    I am developing an add-on for a plugin. Now lets say this plugin sends output "Process Successful." when the player types in /process . How can I develop a plugin that will do something ONCE this message arrives to the player? Is there a specific event for it?
     
  2. Offline

    cholo71796

    @funstein
    The plugin would have to have an event that you could hook into, like Bukkit's onPlayerMove. I doubt it does, though. Why not just fork and edit the plugin directly?
     
  3. Offline

    funstein

    @cholo71796 I am planning to release this as an addon, so I'd like it to work that way. Isn't there a way of reading chatbox output?
     
  4. Offline

    cholo71796

    @funstein
    I don't think there's an event triggered for every message, no.

    @funstein
    You could add it to Bukkit and submit a pull request! :p

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
     
    Last edited by a moderator: May 19, 2016
  5. Offline

    funstein

    @cholo71796 alright, lets say I found some event. Is there a way of fetching messages from the message box?
     
  6. Offline

    stelar7

    like this?
    Code:
    OnPlayerChat (PlayerChatEvent event) {
    event.getMessage()
    }
    
     
  7. Offline

    funstein

    Yeah, but I dont want the message the player has sent, I want the last text the player recieves.
     
  8. Offline

    stelar7

    I don't think it's possible atm...
     
Thread Status:
Not open for further replies.

Share This Page