KPage Inventory Impl
Properties
All animations Identifier maps to the animation
Content of the container
The current animation if one is running
Formatted title given by the titleBuilder
Client side inventory instances
Sets whether the items can be clicked while the inventory is inside an animation
Animation which will be played when the inventory is opened
List of the pages of this inventory. Index of the item is also the index of the page
Whether the current page index should be saved when the inventory is closed
Static pages are used for pages which should not be in the standard pagination, but serve as a static content display page. So in the normal page cycle these pages won't show Pages will be identified by the given identifier
If supplied this function is used to build the title for the inventory. When the page switches, this function will be called with the current page
Views which currently look at the inventory
Functions
Adds the animation
Adds a static page to this inventory
Build a title for the inventory based on the given builder
Clears the inventory from all items inside it
Returns the KInventoryHolder of this inventory
Inserts the given page into the inventory at the given index
Whether the object is currently inside an animation
Notifies the inventory that the given item has been clicked by the given player
Util function to notify this inventory to rebuild the current page. Used when a page is changed, and needs to be updated in the parent inventory.
Executed when the inventory is closed To catch this the bukkit event is used
Executes the passed function, when a bukkit org.bukkit.inventory.ItemStack is clicked
Executed when the inventory is opened To catch this the bukkit event is used
Moves to the previous page in the inventory If looping is enabled will loop back to the last page when end is reached
Removes the given space from the inventory
Sets the page with the current index
Sets the item to the absolut slot in the inventory, overriding the already existing item. This function can be used to override header and footer of the page
Set the current page to the given static page The current index will be saved To get back to the indexed pages use
Starts the given animation, but will not save it
Starts the animation with the given identifier
Constructs the bukkit inventory from this KInventory with the current set content