Helping Creating Book

Discussion in 'Plugin Development' started by Jbitters3, Sep 1, 2013.

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

    Jbitters3

    I am fairly new to Bukkit, and I do not understand how to add an author, title, or pages to a written book. Here is what I have so far.
    Code:java
    1. ItemStack book = new ItemStack(Material.WRITTEN_BOOK);
    2. BookMeta meta = (BookMeta) book.getItemMeta();
    3.  
    4.  
    5.  
    6. book.setItemMeta(meta);
    7.  
    8. ItemStack compass = new ItemStack(345);
    9. compass = setItemName(compass, "§aQuick-Teleport");
    10. player.getInventory().addItem(compass);
     
  2. Offline

    Jbitters3

    Assist I have looked over it, and still am unsure of how to add a title and such.
     
  3. Offline

    Netox055

    Easy!
    Code:
    meta.setAuthor("author name"); // Set an Author
    meta.setTitle("title"); // Set the Title
    meta.setPage("Page 1", "Page 2"); // Set Pages
    
    Sorry for my bad english :)
     
Thread Status:
Not open for further replies.

Share This Page