Player Interface


The player interface is a peripheral that can be used to interact with a linked player's inventory. Players are linked by placing a permissions card inside of the interface. The interface cannot access a player's inventory if they do not have a permissions card in the interface.

Functions

Function Returns Description
getPlayerInv(string playerName) PlayerInventory inventory Returns a PlayerInventory object of the specified player.
setOutputSide(string side) nil Sets the output side of the interface. Takes cardinal directions.
setInputSide(string side) nil Sets the input side of the interface. Takes cardinal directions.
getOutputSide() string outputSide Returns the output side of the interface.
getInputSide() string inputSide Returns the input side of the interface.

PlayerInventory

An object used to interact with a player's inventory. Can be accessed with the getPlayerInv() method of the player interface.

Functions

Function Returns Description
getStackInSlot(num slotIndex) table stack Returns a table with information pertaining to the itemstack in slot slotIndex.
retrieveFromSlot(num retrieveSlot, num destSlot) boolean success Retrieves a stack from slot retrieveSlot and attemtps to place it in slot destSlot of the output inventory.
pushToSlot(num sourceSlot, num amount, num destSlot) boolean success Pushes amount of items from stack from slot sourceSlot in the input inventory to slot destSlot in the player's inventory.
push() num sourceSlot, num destSlot Pushes entire stack from slot sourceSlot in the input inventory to slot destSlot of the player's inventory.