How to allow user to enter more text than allowed by the chat box?

Discussion in 'Spigot Plugin Development' started by robotnik, May 28, 2016.

  1. Basically, I want my plugin to store messages created by players. However I feel the character limit for the chat box is too small, is there any way to bypass this?

    Maybe is there a way to open the book GUI and allow players to type into a book, and then get a string from the book GUI?
     
  2. Is that for usual players or only admins? If this part of your plugin is only admin, they can just enter it through the console.
     
  3. There is a PlayerChatTabComplete event. Maybe when the player hits tab, it runs #closeInventory() on them to close their chat box and have a message in chat to continue typing to add on to the current message. Then they can send it by hitting enter. You could use a HashMap with the UUID as a key and the String as a value. Also using the AsyncPlayerChatEvent to check if the HashMap contains them and if it does remove them from it and do things accordingly (you can set the message).
     
    • Like Like x 1
  4. I'm not sure about the book thing, but I'd suggest you use a configuration file.
     
  5. Thanks, ill give that a try