Solved Quick Question!

Discussion in 'Plugin Development' started by ChocolateChoo, Oct 13, 2014.

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

    ChocolateChoo

    Anyone know a plugin where only people within a certain range can see your chat?
     
  2. Offline

    teej107

    * looks at current forum section *
    uuh... what have you tried? It's hard to help without any code.
     
  3. Offline

    Caprei

    Considering this is in plugin development, I thought I should post a quick way to do this, if anyone else wants this. You need to cancel the chat event, using the ASyncPlayerChatEvent, but store the message. Then you use getNearbyEntities to find which players are near the player who was talking. Then send it to those players.
     
  4. Caprei (Don't forget thread safety)
     
  5. Offline

    ChocolateChoo

    AdamQpzm likes this.
Thread Status:
Not open for further replies.

Share This Page