Clickable Written Book ON Join 0.2

Custom Written Book [Can be used for Change Logs, Announcements etc.]

  1. realzun
    Tested Minecraft Versions:
    • 1.12
    Source Code:
    https://github.com/dulehuch/custombook-onjoin
    Contributors:
    MysteX, Optic_Fusion1
    Clickable Written Book
    Pretty self-explanatory, when a player joins, the server opens a written book for the player. The written book can be configured to your liking and it also supports CLICKABLE and HOVER OVER-able text.


    CONFIG.YML
    can be a bit confusing at first glance but if you think about it it's pretty simple.

    • first-join-only - Whether or not the code should run only if it's player's first join, the method I used is #hasPlayedBefore() so if you wish to reset this you would have to delete playerdata from your world folders.
    • players-receive-the-book - Whether or not the players should get the book as an item so they can read it manually in the future. If set to false the next does not matter.
    • slot-for-the-book - On which slot should the book be set. Human counting, starting from 1.
    • book-title - Book's title, you may use color codes here
    • book-author - Book's author, you may use color codes here
    • book-display-name - Book's display name, you may use color codes here
    • pages-count - The amount of pages that the book is going to have, if you set it higher than the amount of pages that you actually have it will create a blank page, however if you set it lower it will create up to the number that you specified.
    • I will go through one page but the same applies to all of them, just copy paste it as I've done in config.yml.
      • line-count - Not necessarily the amount of lines, but the amount of text components (pieces), same applies as for the pages-count.
      • I will go through one line but the same applies to all of them, just copy paste it as I've done in config.yml.
        • text - The text that will show up, you may not use color codes in here, it will work but on the line break the color will disappear. However it is possible to add a color, more on that later.
        • clickable - Whether or not the text can be clickable, if you set this to false the next two do not matter.
        • click-action - The action that will be performed upon clicking the text, if you are not familiar with possibilities read this. I do not guarantee that all of them will work, I've only tested #OPEN_URL, #RUN_COMMAND, all of them should work but I am not 100% sure.
        • hoverover - Whether or not some text will appear when you hover over the text from text field. If set to false the next one does not matter.
        • hoverover-text - The text that will be displayed upon hovering over the text. You may use color codes in here.
        • text-color - The color in which text field will be displayed in. Here's the source for the available values for this field. The Color Name / Description column on the far right.
        • text-bold - Whether or not the text should be bold.
    To add:
    • Option for first join only [ADDED]
    • Option for players getting the book so they can manually read it in the future [ADDED]

    The default config.yml will produce what you can see in the images.
    I have provided an example of how you can combine lines and how you can separate them.


    Please keep in mind that I have created this in one NIGHT, i will probably improve the code and how it works in the future.

    I'd like to give credit to Mystex and Optic_Fusion1 since code examples of both of them have helped me to achieve this. 2018-01-13_21.30.43.png
    2018-01-13_21.30.46.png


    Flox likes this.

Recent Updates

  1. CWB Update 0.1

Recent Reviews

  1. casper010
    casper010
    5/5,
    Version: 0.2
    very good, but have you skype/discord or something like that? because i want to tell something :)
    1. realzun
      Author's Response
      Thank you! Here's my Discord huch#5769
  2. Flox
    Flox
    5/5,
    Version: 0.1
    Simple and very nice small plugin, keep up good work and I expect more plugins to see from you!
    1. realzun
      Author's Response
      Thank you for the review! If you have any suggestions feel free to PM me or post in the Discussions section!