PlayerChatEvent Deprecated?

Discussion in 'Plugin Development' started by ZanderMan9, Nov 7, 2014.

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

    ZanderMan9

    I was wondering, why is PlayerChatEvent deprecated? Is it because of 1.8, or is there just a better method to use? All I need is for my method to be called whenever a player sends a chat message. And also, to be sure if it is a command, not to grab that. I can always check that, though, just by looking at the first character.
     
  2. Offline

    Skionz

    Gerov and The Fancy Whale like this.
  3. Offline

    ZanderMan9

    Skionz Oh, but I do need to edit the method. I believe async will call my method and go ahead and fire off the event regardless of what I do, no?
     
  4. Offline

    Skionz

    ZanderMan9 It gets called whenever a player talks.
     
  5. Offline

    ZanderMan9

    Skionz I know, but I need to format the message. Will Async allow that?
     
  6. Offline

    Konato_K

  7. Offline

    ZanderMan9

    So then, what exactly is the difference? And the point to having two different ones? Konato_K
     
  8. Offline

    Walruski

  9. Offline

    Konato_K

    ZanderMan9 The chat used to be synchronous before, in some update it got it's own thread so they added the async chat, however, to not break all the old plugins that would take a while to update they keeped the PlayerChatEvent and deprecated it to discourage it's usage, but you're supposed to use Async all the time for your stuff.
     
  10. Offline

    ZanderMan9

    Walruski I understand what async means, but I assumed it meant asynchronous as in the event is fired and the methods in all the plugins are called async, meaning they happen simultaneously.

    Konato_K OK, thanks!
     
Thread Status:
Not open for further replies.

Share This Page