Container
Live protocol-neutral handle for one authoritative container.
Bedriox\Api\Inventory\Container
classBedriox\Api\Inventory
Public methods
__construct(Closure $view, Closure $setItem, Closure $addItem, Closure $removeItem, Closure $clear, Closure $open, Closure $close, ?Closure $guard = null)Typed public method.
isAvailable(): boolTyped public method.
view(): ?Bedriox\Api\Inventory\ContainerViewTyped public method.
type(): ?Bedriox\Api\Inventory\ContainerTypeTyped public method.
position(): ?Bedriox\Api\World\BlockPositionTyped public method.
contents(): arrayTyped public method.
viewerUuids(): arrayTyped public method.
setItem(int $slot, ?Bedriox\Api\Inventory\ItemStack $stack): boolTyped public method.
addItem(Bedriox\Api\Inventory\ItemStack $stack): ?Bedriox\Api\Inventory\ItemStackAdds as much as possible and returns the unaccepted remainder, if any.
removeItem(Bedriox\Api\Inventory\ItemStack $stack): intRemoves up to the requested count and returns the number actually removed.
clear(): boolTyped public method.
open(Bedriox\Api\Player\Player $player): boolTyped public method.
close(Bedriox\Api\Player\Player $player): boolTyped public method.
