UtilityAPI is in a very early stage of development and many features are still to come. If you wand a specific feature let me know and I'll see if I can implement it
Current Features:
Crafting
Add crafting recipes faster and get more control over them
Code (Text):
// The Material[] has to have 9 entries. They translate to the 9 slots in a crafting table (left to right)
// There is an overload for this method which takes in all 9 Material items instead of an array
// Material.AIR means the slot in the crafting table will have to be empty
Material[] ingredients = {Material.AIR, Material.COAL, Material.AIR,
Material.COAL, Material.COAL_BLOCK, Material.COAL,
Material.AIR, Material.COAL, Material.AIR};
CraftRecipe recipe = new CraftRecipe(new ItemStack(Material.DIAMOND), ingredients, "DiamondRecipe", this);
recipe.addRecipe();
// First create a cooldown
// Give it a time and TimeScale (Minutes or Seconds)
Cooldown cooldown = new Cooldown(10, TimeScale.SECONDS);
// Add a player to a cooldown
cooldown.addPlayerToCooldown(player);
// Remove a player from a cooldown
cooldown.removePlayerFromCooldown(player);
// Check if player is on cooldown
// Returns true/ false
cooldown.isOnCooldown(player);
// Get remaining time
// Returns an integer
cooldown.getRemainingCooldown(player); // This will always return in the unit that was given when the cooldown was created
cooldown.getRemainingCooldown(player, TimeScale.MINUTES); // This will return in the given unit
Item and ItemBuilder
Item works like ItemStacks but applies the ItemMeta for you.
ItemBuilder allows you to create ItemStacks in just one line of code. It's perfect for just small Items you need to quickly create or test around with.