minny.zephyrus.utils
Class Merchant

java.lang.Object
  extended by minny.zephyrus.utils.Merchant
All Implemented Interfaces:
net.minecraft.server.v1_5_R3.IMerchant

public class Merchant
extends java.lang.Object
implements net.minecraft.server.v1_5_R3.IMerchant


Constructor Summary
Merchant()
           
 
Method Summary
 void a(net.minecraft.server.v1_5_R3.EntityHuman h)
          Sets the human entity for the Merchant
 void a(net.minecraft.server.v1_5_R3.MerchantRecipe recipe)
          Adds a trade to the merchant
 void addOffer(org.bukkit.inventory.ItemStack i1, org.bukkit.inventory.ItemStack i2, org.bukkit.inventory.ItemStack i3)
          Adds a new trade to the merchants
 Merchant clone()
          Clones the merchant and returns a new instance with the same trades
 org.bukkit.inventory.ItemStack getInput1()
          Gets the first input for the trade
 org.bukkit.inventory.ItemStack getInput2()
          Gets the second input for the trade
 org.bukkit.inventory.ItemStack[] getItems()
          Gets the list of items for this merchant
 net.minecraft.server.v1_5_R3.MerchantRecipeList getOffers(net.minecraft.server.v1_5_R3.EntityHuman arg0)
          Gets the list of recipes for the Merchant
 org.bukkit.inventory.ItemStack getOutput()
          Gets the output input for the trade
 net.minecraft.server.v1_5_R3.EntityHuman m_()
          Gets the HumanEntity associated with the merchant
 void openTrade(net.minecraft.server.v1_5_R3.EntityHuman h)
          Opens the trade for the given EntityHuman
 void openTrade(org.bukkit.entity.Player player)
          Opens the trade for the given player
 void setOffers(net.minecraft.server.v1_5_R3.MerchantRecipeList list)
          Sets the offer for the merchant
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Merchant

public Merchant()
Method Detail

addOffer

public void addOffer(org.bukkit.inventory.ItemStack i1,
                     org.bukkit.inventory.ItemStack i2,
                     org.bukkit.inventory.ItemStack i3)
Adds a new trade to the merchants

Parameters:
i1 - Input one
i2 - Input two
i3 - Result

a

public void a(net.minecraft.server.v1_5_R3.EntityHuman h)
Sets the human entity for the Merchant

Specified by:
a in interface net.minecraft.server.v1_5_R3.IMerchant

a

public void a(net.minecraft.server.v1_5_R3.MerchantRecipe recipe)
Adds a trade to the merchant

Specified by:
a in interface net.minecraft.server.v1_5_R3.IMerchant
Parameters:
recipe - The MerchantRecipe to add

getOffers

public net.minecraft.server.v1_5_R3.MerchantRecipeList getOffers(net.minecraft.server.v1_5_R3.EntityHuman arg0)
Gets the list of recipes for the Merchant

Specified by:
getOffers in interface net.minecraft.server.v1_5_R3.IMerchant

setOffers

public void setOffers(net.minecraft.server.v1_5_R3.MerchantRecipeList list)
Sets the offer for the merchant

Parameters:
list - The MerchantRecipeList to add

m_

public net.minecraft.server.v1_5_R3.EntityHuman m_()
Gets the HumanEntity associated with the merchant

Specified by:
m_ in interface net.minecraft.server.v1_5_R3.IMerchant

openTrade

public void openTrade(org.bukkit.entity.Player player)
Opens the trade for the given player

Parameters:
player - The player to send the trade to

openTrade

public void openTrade(net.minecraft.server.v1_5_R3.EntityHuman h)
Opens the trade for the given EntityHuman

Parameters:
h - The EntityHuman to send the trade to

getItems

public org.bukkit.inventory.ItemStack[] getItems()
Gets the list of items for this merchant

Returns:
An itemstack array containing the trade items

getInput1

public org.bukkit.inventory.ItemStack getInput1()
Gets the first input for the trade

Returns:
The first input itemstack

getInput2

public org.bukkit.inventory.ItemStack getInput2()
Gets the second input for the trade

Returns:
The second input itemstack

getOutput

public org.bukkit.inventory.ItemStack getOutput()
Gets the output input for the trade

Returns:
The output input itemstack

clone

public Merchant clone()
Clones the merchant and returns a new instance with the same trades

Overrides:
clone in class java.lang.Object