Package org.bukkit.inventory.meta

Examples of org.bukkit.inventory.meta.BookMeta


  {
    if (this.customMatchInfoBook != null)
      return this.customMatchInfoBook.clone();

    ItemStack book = new ItemStack(Material.WRITTEN_BOOK, 1);
    BookMeta meta = (BookMeta) book.getItemMeta();

    meta.setTitle(ChatColor.RED + "" + ChatColor.BOLD + this.getMapName());
    meta.setAuthor(ChatColor.DARK_GRAY + this.getAuthorList());

    List<String> pages = Lists.newArrayList();

    // PAGE 1
    pages.add(BookUtil.makePage(
      BookUtil.center(ChatColor.BOLD + "[" + AutoReferee.getInstance().getName() + "]")
    ,  BookUtil.center(ChatColor.DARK_GRAY + this.getMapName())
    ,  BookUtil.center(" by " + ChatColor.DARK_GRAY + this.getAuthorList())
    ,  BookUtil.center("(v" + this.getMapVersion() + ")")
    ""
    ,  BookUtil.center(ChatColor.DARK_GRAY + "" + ChatColor.BOLD + "-- Teams --")
    ,  BookUtil.center(this.getTeamList())
    ""
    ,  ChatColor.BOLD + "Pg2." + ChatColor.RESET + " About the Map"
    ,  ChatColor.BOLD + "Pg3." + ChatColor.RESET + " About the Plugin"
    ));

    // PAGE 2
    pages.add(BookUtil.makePage(
      BookUtil.center(ChatColor.BOLD + "[" + AutoReferee.getInstance().getName() + "]")
    ,  BookUtil.center(ChatColor.DARK_GRAY + this.getMapName())
    ,  BookUtil.center(" by " + ChatColor.DARK_GRAY + this.getAuthorList())
    ,  BookUtil.center("(v" + this.getMapVersion() + ")")
    ""
        // TODO
    ,  BookUtil.center("Coming soon...")
    ));

    // PAGE 3
    pages.add(BookUtil.makePage(
      BookUtil.center(ChatColor.BOLD + "[" + AutoReferee.getInstance().getName() + "]")
    ""
    ,  ChatColor.BOLD + "/jointeam <team>"
    "  Join team"
    ""
    ,  ChatColor.BOLD + "/jointeam"
    "  Join random team"
    ""
    ,  ChatColor.BOLD + "/leaveteam"
    "  Leave current team"
    ""
    ,  ChatColor.BOLD + "/ready"
    "  Mark team as ready"
    ));

    meta.setPages(pages);
    book.setItemMeta(meta);
    return book;
  }
View Full Code Here

TOP

Related Classes of org.bukkit.inventory.meta.BookMeta

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.