πExample
Here you can find the standard structure of a RyseInventory
A possible simple setup. We now go through the following steps:
We create a new builder object with RyseInventory.builder()
Through the new object we have access to all the method explained here.
We call the title method to give the inventory a title.
We need to give the inventory a size. We say here 3 rows (Equal to .size(9*3))
We assign the inventory to a provider.
We implement the init method. This method will be called every time it is opened.
In the build method we pass our main class. We now have a RyseInventory.
RyseInventory.builder()
.title("Basic Inventory")
.rows(3)
.provider(new InventoryProvider() {
@Override
public void init(Player player, InventoryContents contents) {
}
})
.build(this)
Through the final build, we now have an object of RyseInventory instead of RyseInventory.Builder. This allows us to use new methods. If you are unsure which methods, you can reread them here.
Last updated