kakduman / Acorn

Github to sort bugs and feature requests for the AcornMC server
5 stars 1 forks source link

Sabotage: use JSON formatting for the sabotage book #167

Closed kakduman closed 3 years ago

kakduman commented 4 years ago

Brief Description Instead of specifying lines of text for the book in the config, Sabotage should allow me to specify an item using JSON formatting. For example, the method of giving players a written getting started book on the survival server with /kit book is making Essentials run the following console command: /minecraft:give {USERNAME} written_book{pages:['["",{"text":"View our rules at","color":"black"},{"text":"\\n","color":"reset"},{"text":"acornmc.org/rules","color":"blue","clickEvent":{"action":"open_url","value":"https://acornmc.org/rules"},"hoverEvent":{"action":"show_text","contents":"Click me to view our rules!"}},{"text":"\\n\\nFor useful info, check\\n","color":"reset"},{"text":"acornmc.org/help","color":"blue","clickEvent":{"action":"open_url","value":"https://acornnmc.org/help"},"hoverEvent":{"action":"show_text","contents":"Click me for some useful info!"}},{"text":"\\n\\nJoin our Discord with\\n","color":"reset"},{"text":"discord.gg/CRBQKYA","color":"blue","clickEvent":{"action":"open_url","value":"https://discord.gg/CRBQKYA"},"hoverEvent":{"action":"show_text","contents":"Click me to join our Discord!"}},{"text":"\\n\\nView our ranks at\\n","color":"reset"},{"text":"acornmc.org/ranks","color":"blue","clickEvent":{"action":"open_url","value":"https://acornmc.org/ranks"},"hoverEvent":{"action":"show_text","contents":"Click me to view our ranks"}},{"text":"\\n\\n","color":"reset"},{"text":"/vote","color":"blue","clickEvent":{"action":"run_command","value":"/vote"},"hoverEvent":{"action":"show_text","contents":"Click me to vote!"}},{"text":" to rank up and\\nreceive crate keys!","color":"reset"}]'],title:"Getting Started",author:"Acorn",display:{Lore:["Some useful links"]}}

Why do you want the feature? Support for similar formatting to the command that gives a getting started book on survival would be awesome since I want to use clickable links and hover text.

EaglePrideMC commented 3 years ago

Sabotage now supports a /give command to give players the welcome book.