Documentation & Usage
MineTools Utility Library
MineTools is a utility library to make the life of a Bukkit plugin programmer easier. Have fun watching your dreams come true at last with the assistance of MineTools.
Adding MineTools To Your Eclipse Project
Adding MineTools to your project is just the same thing as adding Bukkit - when creating the project, add another external jar. This time, MineTools. If you have already created your project, right click the plugin folder, and navigate to the Libraries tab. Now add MineTools via the "Add External Jar" button.
Once you have added MineTools to your project, you'll want to declare it as an object so that it can be used in your project. To do this, you first declare it in the field. To do this, you'll first decide what parts of MineTools you want to use. If you want to use the general ServerTool, you would do private ServerTool servertool; If you wanted to use PlayerTool, you would do private PlayerTool playertool;. For the sake of this tutorial, we will assume that you are using all of them. Once you're done with that, get into your constructor. Now declare it as an object (For example, ServerTool servertool = new ServerTool(this), or PlayerTool playertool = new PlayerTool(). Please note that when using ServerTools, you have to provide "this" as a parameter.) Once you have to object, you're set. If you want to use something from ServerTools, you would do servertool.methodname(parameters). If you wanted to use something from PlayerTools, you would do playertool.methodname(parameters) etc.
List of Methods:
ServerTool
void - broadcastMessageInWorld(String, String) Recipe - createRecipe(Material, int, String, String, String, char, char, char, Material, Material, Material) Recipe - createRecipe(Material, int, String, String, String, char, char, Material, Material) Recipe - createRecipe(Material, int, String, String, String, char, Material) int - getLimitedRandom(int, int) void - playEffect(Location, Effect) void - playEffect(Player, Effect) void - playSound(Player, Sound, Float, Float)
PlayerTool
void - addExp(Player, int) void - addExpLevels(Player, int) int - amountInInventory(Player, int) void - displayPlayerInventory(Player, Player) void - giveItem(Player, Material, int) boolean - inventoryContains(Player, Material) void - removeExp(Player, int) void - removeExpLevels(Player, int) void - removeItem(Player, Material, int)
WorldTool
World - createWorld(String, WorldType) Make sure to use the MineTool world type here. Not bukkit.org.WorldType. Location - getVoidSpawnLocation(Location, World) World - getWorldObject(World, String, WorldType)
MobTool
void - enableMobSpawning(boolean) void - enableMobSpawning(EntityType, boolean) void - enableMobSpawning(EntityType, World, boolean) void - enableMobSpawning(World, boolean) void - onCreatureSpawn(CreatureSpawnEvent)
SructureTool
Still being worked on! This will include many tools to aid in creating geometric shapes such as spheres and cubes.
Comments