Home›Java›Mods›BookFiles | Book Generator API
BookFiles | Book Generator API
ModsJava

BookFiles | Book Generator API

Java mod listed for Minecraft 1.8–1.12. Downloads from the MC Java Mods app on Android.

⬇ Download on Spigot

BookFiles – Easy to use API to create Custom Books for GameModes.



[​IMG]



If you ever have created a Minigame, you know how hard it is to create instruction books. You need to write every single page in your java code, and honestly – it looks horrible.

Well, that’s why I created BookFiles!

BookFiles allows you to create your Book ingame, save it as a file, and load it in another plugin afterwards as Book!
This saves a lot of time for a work, which has mostly just cosmetical fixes to do.


How to save a book and load it afterwards:


  1. Load the BookFiles.jar, and save it on your server.
  2. Type /bookfile new , use the book and write your content!
  3. Type /bookfile save <optional filename> and press enter.

Example Screenshot: 2016-06-06_00.59.55.png

After you have saved your file, you can load it from your custom plugin via:

Code (Text):

//Loads the .book File as ItemStack from the Folder: /server/plugins/BookFiles/books
BookFiles.getBook(String filename,String title,String author)
Or

Code (Text):

//Loads the .book File from a custom Folder.
BookFiles.getBookFromExtern(File folder, String filename, String title,String author)
These methods will create an ItemStack from the given File which you can use however you want!

Example Plugin

Code (Text):
package com.horizon.test;

import com.horizon.books.BookFiles;
import org.bukkit.Bukkit;
import org.bukkit.event.EventHandler;
import org.bukkit.event.Listener;
import org.bukkit.event.player.PlayerJoinEvent;
import org.bukkit.inventory.ItemStack;
import org.bukkit.plugin.java.JavaPlugin;

public class Test extends JavaPlugin implements Listener {

    public void onEnable(){
        if(!this.getDataFolder().exists())
        this.getDataFolder().mkdirs();
        Bukkit.getPluginManager().registerEvents(this,this);
    }

    @EventHandler
    void onJoin(PlayerJoinEvent e){
        e.getPlayer().getInventory().clear();
        ItemStack book = BookFiles.getBookFromExtern(this.getDataFolder(),"Testbuch","§6Anleitung TRM","TheSilentHorizon");
        e.getPlayer().setItemInHand(book);
    }

}
 

Commands and their permissions

/bookfile help - Shows you all commands useable with bookfile.
Permission: book.help

/bookfile new - Creates a new Book and Quill
Permission: book.new

/bookfile save <optional filename> - Saves the Book as .book
Permission: book.save

Any questions?

Feel free to pm me! If you have questions or tips for this API, write them in the comments!

--------------------------------------------------------------------------------------------------

Uses CommandFramework by minnymin3:

https://github.com/minnymin3/CommandFramework

Plugin details

Read from the plugin's own plugin.yml.

Quick facts

Install steps are the general flow for this file type — How to install Minecraft Java mods & modpacks walks through it step by step.

BookFiles | Book Generator API is a free Minecraft Java mod. Compatible with Minecraft 1.8, 1.9, 1.10, 1.11 and newer. Downloaded 368 times (via Spigot). Download it and open it directly in the game.

Explore more