βοΈBuilder
Here you will find all the methods that are in the RyseInventory.Builder class.
As you create the inventory, there are methods you need to make the inventory work. Also, there are methods that are not so important and are meant for special cases.
The following methods are mandatory:
rows or size
Determines how large the inventory should be.
title
The inventory title that will be displayed when you open it.
provider
An interface where you have to inherit the init method! This is always called when the inventory is opened.
There are many other methods such as:
delay
The delay until the scheduler starts. You can pass a time and a time unit.
openDelay
The delay until the inventory is opened. The time and time unit is freely selectable.
period
The time period in which the scheduler should always be executed. The time and time unit can be freely selected.
closeAfter
The period of how long it should take for the inventory to be closed. The time and time unit can be selected by the user.
ignoreClickEvent
Disables the InventoryClickEvent for special inventories. E.g. when you click on the lower one.
ignoreEvents
Enables a desired event that is disabled by RyseInventory by default.
ignoredSlots
Within this slot, the InventoryClickEvent of RyseInventory does not take effect. This allows the player to take out or put in items. Furthermore, you can include your own logic.
clearAndSafe
When the inventory is opened, the contents of the player's inventory are cached and the inventory is emptied. When closing the inventory, he gets his inventory back.
identifier
Gives the inventory a unique identification. This is necessary if you use e.g. inventories from the RyseInventory API to identify the inventory there.
listener
Allows the player to add his own event, which affects the whole inventory.
options
Allows additional options. For example, that the player does not get damage when he has the inventory open.
preventClose
The player cannot close the inventory. Only the #close method can close the inventory.
preventTransferData
This method is used when you do not want to take internal inventory data with you to the other side.
type
Determines the type of inventory. By default, this is a chest.
fixedPageSize
You want a static number of pages? With this you can have a fixed number of pages.
titleHolder
A title that will be used when the loadTitle method is used.
loadDelay
Here you can display the contents of the inventory with a delay. The time and time unit is freely selectable.
loadTitle
Delays the loading of the inventory title. In the time the title defined by #titleHolder is used.
close
Here you can define possible reasons why the inventory should be closed automatically.
animation
Defines a SlideAnimation. That is an animation where items appear from left->right or from right->left or from top->bottom or from bottom->top.
enableAction
Enables advanced control of inventory actions. By default DOUBLE_CLICK is disabled. But with this you can enable it.
disableUpdateTask
If you don't implement the update method from the InventoryProvider, you don't need a scheduler. So I recommend to call this method if you don't need an updater task.
permanentCache
Ensures that the inventory after it was built is permanently cached. As a result, you can always get it through the InventoryManager.
Last updated