How could I make a 'Someone is currently typing..." at the bottom of the chat box?

Discussion in 'Plugin Development' started by TurtlesBeast23, Nov 25, 2017.

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

    TurtlesBeast23

    I want to make it so that at the bottom of the chat box, it says "Someone is currently typing..." when someone is typing in chat, so I'm wondering how I could do this or if it's possible?

    Thanks,
    TurtlesBeast23
     
  2. Offline

    Zombie_Striker

    @TurtlesBeast23
    Clients do not send any information when they start typing. You only know when the full message has been sent.

    However, you can detect that a player has stopped moving for a short period of time (more than 5 seconds), which hints that they may be typing. If you don't expect players to be afk, this is a way of detecting chat.

    Either way, the best way I can think of that achieves this would be store the last 20 or more chat messages. Then, when you want to notify that players are chatting, send the message you want. When a player actually sends the message, resend all the other chat messages again (without the someone is typing message) along with the message that the player sent.
     
  3. Offline

    TurtlesBeast23

  4. Offline

    Blares

    Maybe make a delay??????
    when they send the message make a bukkit timer via runnable and then make the server send to everyone <player> is typing...
    after 3 or so seconds send the message?
     
  5. Offline

    MightyOne

    That would be completely useless. Abd hindering. And beside every logic
     
    mehboss likes this.
Thread Status:
Not open for further replies.

Share This Page