PocketInventory
Example PocketInventory usage.
It is common to create custom inventories in connection with commands. When calling the command, the custom inventory will be shown to the player.
The fulfill the requirement of a Player
, the requirePlayer
method is overridden to return true
.
This example implementation of the PocketInventory
creates an inventory with 4 rows and two items contained: a golden apple in the middle of the second row and a dark oak door at the bottom right corner.
While living inside a PocketCommand
the inventory is shown every player calling the associated command (/shop
in this case).
Last updated