Skip to content
This repository has been archived by the owner on Mar 26, 2019. It is now read-only.

Enes5519Plugins/InventoryGUI

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

InventoryGUI

InventoryGUI is a Altay and PocketMine-MP plugin that eases creating fake inventories!

Creating a GUI

First you choose inventory. InventoryGUI has two inventories, but you can create your own gui types.

use Enes5519\InventoryGUI\inventory\ChestInventory;
use Enes5519\InventoryGUI\inventory\DoubleChestInventory;

Let's say you chose DoubleChestInventory.

$inv = new DoubleChestInventory();

Your fake double chest inventory now ready. Now, let's fill this with some items.

$inv->setContents([
	ItemFactory::get(Item::APPLE),
	ItemFactory::get(Item::COMPASS)
]);

Let's send it to the player now.

$player->addWindow($inv);

Yup, that's it. It's that simple.

Specifying a custom name to the GUI

$inv->setCustomName("Custom Name");

Releases

No releases published

Packages

No packages published

Languages