C# Class MiningGameServer.PlayerClasses.PlayerInventory

Afficher le fichier Open project: geel9/Minor-Destruction Class Usage Examples

Méthodes publiques

Свойство Type Description
Inventory ItemStack[]
NetworkPlayer NetworkPlayer
PlayerInventorySelected int

Méthodes publiques

Méthode Description
CanPickup ( ItemStack item, int slotStart = -1 ) : int

Returns the amount of an ItemStack that will be left. 0 if all are picked up.

EmptyBag ( ) : void
GetNumItemInInventory ( byte id ) : int
GetPlayerItemInHand ( ) : ServerItem
GetPlayerItemStackFromInventory ( byte id ) : ItemStack
GetPlayerItemStackInHand ( ) : ItemStack
HasItem ( byte id ) : bool
PickupItem ( ItemStack item, bool overflow = false ) : void

Picks up an item into the inventory

PlayerInventory ( NetworkPlayer player ) : System
RemoveItemAt ( int slot ) : void
RemoveItems ( byte itemID, int numToRemove ) : void
RemoveItemsAtSlot ( int slot, byte itemID, int numToRemove ) : void
SetBagSize ( int size ) : void

Method Details

CanPickup() public méthode

Returns the amount of an ItemStack that will be left. 0 if all are picked up.
public CanPickup ( ItemStack item, int slotStart = -1 ) : int
item ItemStack The ItemStack to test against
slotStart int Used for recursion.
Résultat int

EmptyBag() public méthode

public EmptyBag ( ) : void
Résultat void

GetNumItemInInventory() public méthode

public GetNumItemInInventory ( byte id ) : int
id byte
Résultat int

GetPlayerItemInHand() public méthode

public GetPlayerItemInHand ( ) : ServerItem
Résultat MiningGameServer.Items.ServerItem

GetPlayerItemStackFromInventory() public méthode

public GetPlayerItemStackFromInventory ( byte id ) : ItemStack
id byte
Résultat ItemStack

GetPlayerItemStackInHand() public méthode

public GetPlayerItemStackInHand ( ) : ItemStack
Résultat ItemStack

HasItem() public méthode

public HasItem ( byte id ) : bool
id byte
Résultat bool

PickupItem() public méthode

Picks up an item into the inventory
public PickupItem ( ItemStack item, bool overflow = false ) : void
item ItemStack The ItemStack to pick up
overflow bool If true, then the extra items that are left over (can't be picked up) are dropped.
Résultat void

PlayerInventory() public méthode

public PlayerInventory ( NetworkPlayer player ) : System
player NetworkPlayer
Résultat System

RemoveItemAt() public méthode

public RemoveItemAt ( int slot ) : void
slot int
Résultat void

RemoveItems() public méthode

public RemoveItems ( byte itemID, int numToRemove ) : void
itemID byte
numToRemove int
Résultat void

RemoveItemsAtSlot() public méthode

public RemoveItemsAtSlot ( int slot, byte itemID, int numToRemove ) : void
slot int
itemID byte
numToRemove int
Résultat void

SetBagSize() public méthode

public SetBagSize ( int size ) : void
size int
Résultat void

Property Details

Inventory public_oe property

public ItemStack[] Inventory
Résultat ItemStack[]

NetworkPlayer public_oe property

public NetworkPlayer NetworkPlayer
Résultat NetworkPlayer

PlayerInventorySelected public_oe property

public int PlayerInventorySelected
Résultat int