Type in Command Bar (But don't send)

Discussion in 'Spigot Plugin Development' started by TheDiamondWorm, May 2, 2015.

  1. How can I type something in the chat/command bar of a player but not send it? I've seen it done in the sense of when you click on a username and /msg <player> is typed.
  2. You can't do this without client interaction or a clientside mod.

    You need the user to click some text and suggest a command. http://www.spigotmc.org/wiki/the-chat-component-api/#events
    • Like Like x 1
  3. You need to send one of the new chat messages. Look into the ComponentBuilder to create this special message. You can send it to a player with player.spigot ().sendMessage ().

    But what you are looking to do is add a click event with the action "suggest_command"

    Edit: dangit cory :p
    • Informative Informative x 1