FakeInventories

FakeInventories 1.1.1

Compatible API Versions
1.0.11+
Sourcecode
https://github.com/IWareQ/FakeInventories
Contributors
IWareQ
FakeInventories

FakeInventories is a simple library plugin for PowerNukkit/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.get(Item.IRON_BLOCK), (item, event) -> {
    event.setCancelled(true);

    Player target = event.getTransaction().getSource();
    
    target.sendMessage("is custom item handler in addItem method");
    
    target.removeWindow(inventory);
})

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>
Dependency
XML:
<dependency>
    <groupId>com.github.IWareQ</groupId>
    <artifactId>FakeInventories</artifactId>
    <version>Tag</version>
</dependency>
Author
IWareQ
Downloads
79
Views
278
First release
Last update
Rating
5.00 star(s) 2 ratings

More resources from IWareQ

Latest updates

  1. Release 1.1.1

    Added addItem() method in CustomInventory
  2. Release 1.1.0

    Added JitPack Replaced TriConsumer to ItemHandler Stuff

Latest reviews

Good! Keep up the good work! I hope you will continue your great work!
IWareQ
IWareQ
Thank you for your feedback, I am very glad
This library dont need maven dependencies? I can run with out dependencies?
IWareQ
IWareQ
Thank you for your feedback, I added a plugin to jitpack, read the description to connect it to your project
Top