Skip to content

SlotValidatedInventory ​

interface · pocketmine\inventory\SlotValidatedInventory · source

A "slot validated inventory" has validators which may restrict items from being placed in particular slots of the inventory when transactions are executed.

Methods ​

getSlotValidators() ​

php
public function getSlotValidators() : \pocketmine\utils\ObjectSet

Returns a set of validators that will be used to determine whether an item can be placed in a particular slot. All validators need to return null for the transaction to be allowed. If one of the validators returns an exception, the transaction will be cancelled.

There is no guarantee that the validators will be called in any particular order.

VanillaMine is a fork of PocketMine-MP, maintained by Luxury Nodes. Not affiliated with the PMMP team or Mojang.