Class PlayerInventory

java.lang.Object
  extended by ItemArray<ji>
      extended by PlayerInventory
All Implemented Interfaces:
Inventory

public class PlayerInventory
extends ItemArray<ji>
implements Inventory


Field Summary
Modifier and Type Field and Description
 
Fields inherited from class ItemArray
container
 
Constructor Summary
Constructor and Description
PlayerInventory(Player player)
           
 
Method Summary
Modifier and Type Method and Description
 java.lang.String getName()
           
 Player getPlayer()
          Returns the owner of this PlayerInventory
 void giveItem(int itemId, int amount)
           
 void setName(java.lang.String value)
           
 java.lang.String toString()
          Returns a String value representing this PlayerInventory
 void update()
          Updates this inventory, sending the new information to clients
 
Methods inherited from class ItemArray
addItem, clearContents, getContents, getContentsSize, getEmptySlot, getItemFromId, getItemFromId, getItemFromId, getItemFromId, getItemFromSlot, hasItem, hasItem, hasItem, hasItem, hasItem, removeItem, removeItem, removeItem, removeItem, setContents, setSlot, setSlot, setSlot, setSlot
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface Inventory
addItem, clearContents, getContents, getContentsSize, getEmptySlot, getItemFromId, getItemFromId, getItemFromId, getItemFromId, getItemFromSlot, hasItem, hasItem, hasItem, hasItem, hasItem, removeItem, removeItem, removeItem, removeItem, setContents, setSlot, setSlot, setSlot, setSlot
 

Constructor Detail

PlayerInventory

public PlayerInventory(Player player)
Method Detail

giveItem

public void giveItem(int itemId,
                     int amount)

update

public void update()
Description copied from interface: Inventory
Updates this inventory, sending the new information to clients

Specified by:
update in interface Inventory

toString

public java.lang.String toString()
Returns a String value representing this PlayerInventory

Overrides:
toString in class java.lang.Object
Returns:
String representation of this PlayerInventory

getPlayer

public Player getPlayer()
Returns the owner of this PlayerInventory

Returns:
Player

getName

public java.lang.String getName()
Specified by:
getName in interface Inventory

setName

public void setName(java.lang.String value)
Specified by:
setName in interface Inventory