Get number of spaces between args in chat message/command

Discussion in 'Plugin Development' started by Blendy, May 22, 2020.

  1. Offline


    Ok so i want to do a /setdisplayname command and I didn't know how to do it so I made an Async Chat listener and event.getMessage() doesnt return spaces typed, so "s [spaces] d" turns into "s d". I thought that was impossible until i realised that in Hypixel (server) if you do /partychat it counts the spaces.

    Can anyone help me solve this problem?
  2. Offline


    @Blendy Bukkit remove white space for match default format.
    The solution should be to hook into packet that handle the chat. And for listen to packet, the only way is protocolLib i think
  3. Offline


    Ty ima try it :D

Share This Page