- Compatible API Versions
- 1.0.11+
- Sourcecode
- https://github.com/IWareQ/FakeInventories
- Contributors
- IWareQ
FakeInventories
FakeInventories is a simple library plugin for Nukkit Minecraft Bedrock core, that will help you to create your custom virtual inventories with ease.
Usage
Maven
Repository
Dependency
FakeInventories is a simple library plugin for Nukkit Minecraft Bedrock core, that will help you to create your custom virtual inventories with ease.
Usage
Java:
CustomInventory inventory = new CustomInventory(InventoryType.CHEST, "custom title");
inventory.setDefaultItemHandler((item, event) -> {
event.setCancelled(true);
Player target = event.getTransaction().getSource();
target.sendMessage("is default item handler");
});
inventory.addItem((item, event) -> {
event.setCancelled(true);
Player target = event.getTransaction().getSource();
target.sendMessage("is custom item handler in addItem method");
target.removeWindow(inventory);
}, Item.get(Item.IRON_BLOCK), Item.get(Item.IRON_BAR))
inventory.setItem(5, Item.get(Item.DIAMOND), (item, event) -> {
event.setCancelled(true);
Player target = event.getTransaction().getSource();
target.sendMessage("is custom item handler");
target.removeWindow(inventory);
});
player.addWindow(inventory);
Maven
Repository
XML:
<repositories>
<repository>
<id>jitpack.io</id>
<url>https://jitpack.io</url>
</repository>
</repositories>
XML:
<dependency>
<groupId>com.github.IWareQ</groupId>
<artifactId>FakeInventories</artifactId>
<version>Tag</version>
</dependency>