Clickable text in book

Discussion in 'Plugin Development' started by Elimnator, Apr 24, 2015.

Thread Status:
Not open for further replies.
  1. Offline

    Elimnator

    It it possible to have a click-able link/text in a book that runs a command?

    I know it can be done in the chat, but is there a way to put it in books?

    I know how to do this via command, but how can I do it via code?

    Code:
    /give @a minecraft:written_book 1 0 {
    title:"",
    author:"",
    pages:[
    "{
    text:\"Click.\",
    clickEvent:{
    action:run_command,
    value:\"/say Clicked.\"
    }
    }"
    ]
    }
    EDIT by Timtower: merged posts
     
    Last edited by a moderator: Apr 24, 2015
  2. Offline

    mine-care

    @Elimnator not sure flit it is possible but you can try fanciful library designed for that and mabe find a way but i dought it is possible
     
  3. Offline

    vhbob

    @Elimnator you can try getting the open book by the player and getting the text and put it in a player interact event
     
  4. Offline

    Elimnator

    @vhbob
    What? I do not understand what you are saying?
     
  5. Offline

    vhbob

  6. Offline

    Look

    Hmm... It's kinda possible, you can modify the library or make that by the easy way.
    Let's transform your knowledge to your advantage... You know the commands right? Let's imagine this situation: you want to give the magic book to a player who joined the server by the PlayerJoinEvent, why you don't make the console send the command? If you know how to use the command it stays simple to create a book with the command you know runned by console like you did up ^^! :D

    Sorry for my bad English that's because I am Brazilian, but I might you understood what I said! Good luck! ;)
     
Thread Status:
Not open for further replies.

Share This Page