Package net.tnemc.menu.core.builder
Class MenuBuilder
java.lang.Object
net.tnemc.menu.core.builder.MenuBuilder
Builder class for creating instances of the
Menu
class.- Since:
- 1.5.0.0
- Author:
- creatorfromhell
- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbuild()
Builds and returns theMenu
instance based on the provided configuration.withBottom
(boolean bottom) Sets if the player can still utilize the bottom inventory.Sets the close callback for the menu.withNonIcon
(boolean nonIcon) Sets if the player can still utilize the non icon slots in the menu.Sets the open callback for the menu.Adds pages to the menu using varargs.withRows
(int rows) Sets the number of rows for the menu.Sets the title for the menu.
-
Constructor Details
-
MenuBuilder
-
-
Method Details
-
withTitle
Sets the title for the menu.- Parameters:
title
- The title to be set for the menu.- Returns:
- This
MenuBuilder
instance for method chaining.
-
withRows
Sets the number of rows for the menu.- Parameters:
rows
- The number of rows to be set for the menu.- Returns:
- This
MenuBuilder
instance for method chaining.
-
withBottom
Sets if the player can still utilize the bottom inventory.- Parameters:
bottom
- True if the player can use the bottom inventory, their inventory, when in the menu.- Returns:
- This
MenuBuilder
instance for method chaining.
-
withNonIcon
Sets if the player can still utilize the non icon slots in the menu.- Parameters:
nonIcon
- True if the player can click slots in the menu that don't have an icon.- Returns:
- This
MenuBuilder
instance for method chaining.
-
withOpenCallback
Sets the open callback for the menu.- Parameters:
open
- The open callback to be set for the menu.- Returns:
- This
MenuBuilder
instance for method chaining.
-
withCloseCallback
Sets the close callback for the menu.- Parameters:
close
- The close callback to be set for the menu.- Returns:
- This
MenuBuilder
instance for method chaining.
-
build
Builds and returns theMenu
instance based on the provided configuration.- Returns:
- The constructed
Menu
instance.
-