public class TradeAPI
extends java.lang.Object
implements org.bukkit.event.Listener
Modifier and Type | Field and Description |
---|---|
static org.bukkit.inventory.ItemStack |
air
An instance of the AIR material, feel free to use it anywhere, just do NOT modify it
|
Constructor and Description |
---|
TradeAPI()
Initializes the TradeAPI, do NOT use this method
|
Modifier and Type | Method and Description |
---|---|
static org.bukkit.inventory.MerchantRecipe |
makeDeniedRecipe(org.bukkit.inventory.ItemStack... items)
Creates a not acceptable (crossed arrow) MerchantRecipe from the given items
|
static org.bukkit.inventory.MerchantRecipe |
makeRecipe(org.bukkit.inventory.ItemStack... items)
Creates an acceptable MerchantRecipe from the given items
|
static org.bukkit.inventory.MerchantInventory |
openGUI(org.bukkit.entity.Player plr,
java.lang.String title,
java.lang.Iterable<org.bukkit.inventory.MerchantRecipe> recipes)
Opens a TradeGUI for the given player
|
static org.bukkit.inventory.MerchantInventory |
openGUI(org.bukkit.entity.Player plr,
java.lang.String title,
org.bukkit.inventory.MerchantRecipe... recipes)
Opens a TradeGUI for the given player
|
static java.lang.Object |
toNMSMerchantRecipe(org.bukkit.inventory.MerchantRecipe r) |
public static final org.bukkit.inventory.ItemStack air
public static org.bukkit.inventory.MerchantRecipe makeDeniedRecipe(org.bukkit.inventory.ItemStack... items)
items
- - no items = empty recipe, 1. item = output slot, 2. item = first slot, 3. item = second slot, there
are no required amount of given items, this method works with 0,1,2 and 3 arguments too.public static org.bukkit.inventory.MerchantRecipe makeRecipe(org.bukkit.inventory.ItemStack... items)
items
- - no items = empty recipe, 1. item = output slot, 2. item = first slot, 3. item = second slot, there
are no required amount of given items, this method works with 0,1,2 and 3 arguments too.public static org.bukkit.inventory.MerchantInventory openGUI(org.bukkit.entity.Player plr, java.lang.String title, org.bukkit.inventory.MerchantRecipe... recipes)
plr
- - The TradeGUI receiver playertitle
- - The title of the TradeGUIrecipes
- - The recipes shown in the GUIpublic static org.bukkit.inventory.MerchantInventory openGUI(org.bukkit.entity.Player plr, java.lang.String title, java.lang.Iterable<org.bukkit.inventory.MerchantRecipe> recipes)
plr
- - The TradeGUI receiver playertitle
- - The title of the TradeGUIrecipes
- - The recipes shown in the GUIpublic static java.lang.Object toNMSMerchantRecipe(org.bukkit.inventory.MerchantRecipe r)