fanciful icon indicating copy to clipboard operation
fanciful copied to clipboard

FUTURE: Add FancyMessage to BookMeta

Open MiniDigger opened this issue 11 years ago • 7 comments

Just saw the new snapshot and saw that you can apply JSON to books. So it would be great to use fanciful for that. Maybe it will work with toJsonString() but we need to keep an eye on that once the api fro 1.8 is released

MiniDigger avatar Jun 18 '14 17:06 MiniDigger

That seems like a good idea, and looking at the forums - http://www.minecraftforum.net/forums/minecraft-discussion/redstone-discussion-and/351959-1-8-raw-json-text-examples-for-tellraw-title-books#ACTIONShover - it is definitely doable. Unfortunately, as I recently discovered, CB source is no longer available due to DMCA takedown, which will make things harder.

glen3b avatar Jan 04 '15 19:01 glen3b

Just download a good decompiler (I like to use luyten) and you have your source ;D This shouldn't be the problem. The (main) problem I see is, setting the json to the book.

MiniDigger avatar Jan 04 '15 21:01 MiniDigger

Well, after some research, if found, that the we can do that with nbt. The tag of an book contains a list with the json strings. Maybe even bukkits BookMeta.setPage(int id,String value) can handle json. Maybe I should start working on an nice api today. Let's see.

MiniDigger avatar Jan 04 '15 21:01 MiniDigger

MMh, can't it to work. Via the BookMeta I just get the json string displayed and via nbt I get a strange indexarrayoutofboundsexception. no exception but a message in the consol that the exception occurred.

MiniDigger avatar Jan 04 '15 22:01 MiniDigger

Still stinks that CB source isn't available, but I will definitely look into this later.

glen3b avatar Jan 04 '15 22:01 glen3b

It is not available (in the public), but you can decompile it yourself using a decompiler and your spigot jar.

MiniDigger avatar Jan 04 '15 22:01 MiniDigger

I know that, but:

  1. Decompiling is annoying
  2. I am not aware of an Android decompiler app

Anyways, I will decompile the source and look for a good way to do this when I get a chance.

glen3b avatar Jan 05 '15 00:01 glen3b