mkremins / fanciful

Fancy Bukkit message formatting
MIT License
95 stars 82 forks source link

API for insertion #40

Closed mkremins closed 9 years ago

mkremins commented 10 years ago

Example tellraw:

/tellraw @a {
  text:"Click.",
  insertion:"Hello there."
}

Shift-clicking on the text "Click." will then append the text "Hello there." to the contents of the recipient's chat input box. This feature is apparently similar and orthogonal to clickEvent and hoverEvent.

glen3b commented 9 years ago

How is this different from the existing ´suggest` function, other then corresponding to a different JSON tag?

mkremins commented 9 years ago

Insertion differs from suggestion in that suggestions completely replace the text in the chat input box, whereas insertions append to the text that's already been entered. See this post and scroll down to the section about suggest_command for details.

glen3b commented 9 years ago

OK, I can write code for it later today

glen3b commented 9 years ago

You also need to hold shift for insertion to work, according to that thread.

glen3b commented 9 years ago

Wrote the code for this in #56