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 SpigotBookFiles – Easy to use API to create Custom Books for GameModes.
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:
- Load the BookFiles.jar, and save it on your server.
- Type /bookfile new , use the book and write your content!
- Type /bookfile save <optional filename> and press enter.
Example Screenshot:
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)
Code (Text):
//Loads the .book File from a custom Folder.
BookFiles.getBookFromExtern(File folder, String filename, String title,String author)
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);
}
}
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
Quick facts
- Edition: Minecraft Java
- File type: .jar
- Minecraft versions listed: 1.8, 1.9, 1.10
- How to install: Install the matching mod loader (Forge, Fabric or NeoForge) for your Minecraft version. → Download the .jar. → Put it in the .minecraft/mods folder and launch that loader profile.
- Where to get it: Opens on Spigot — not every file is mirrored on our own servers.
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.