CustomItems

Get accesss

  • First you must get access to CustomItems
CustomItems c = (CustomItems) Bukkit.getServer().getPluginManager().getPlugin("CustomItems");
API api = (API) c.getAPI();

Add new item

// api.addItem(name,displayName, ID, permission,color,userecipe,usecustom,lore, abilities,recipe,enchantments);

// Note: ID is minecraft item id

api.addItem("ItemName","Display item name", 276, false,"ยง1",false,true,lore_ArrayList, abilities_ArrayList,null,null);
  • After adding new item you must reload plugin.
api.Reload();
  • Now you can use api.createItem("ItemName") because item is created now.

Create item (returns with ItemStack)

ItemStack item = api.createItem("ItemName");

Add new ability

api.addAbility("AbilityName");

Has ability (returns with true or false)

// api.hasAbility(ItemStack, String);
api.hasAbility(itemStack, "AbilityName");

isCustom (returns with true or false)

// api.isCustom(ItemStack);
api.isCustom(itemStack);
  • This is for v1.5.0

You must login to post a comment. Don't have an account? Register to get one!

  • 1 comment
  • Avatar of Zwanderson1995 Zwanderson1995 Mar 30, 2013 at 06:47 UTC - 0 likes

    If permission is true does this mean we put a permission there or keep it as true?

  • 1 comment

Facts

Date created
Feb 03, 2013
Last updated
Feb 14, 2013

Author