Package net.tnemc.menu.core.builder
Class PlayerPageBuilder
java.lang.Object
net.tnemc.menu.core.builder.PlayerPageBuilder
Builder class for creating instances of the
PlayerInstancePage
class.- Since:
- 1.6.0.0
- Author:
- creatorfromhell
- See Also:
-
Field Summary
Modifier and TypeFieldDescriptionprivate Function<MenuClickHandler,
Boolean> protected Consumer<PageOpenCallback>
private final int
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionbuild()
Builds and returns thePlayerInstancePage
instance based on the provided configuration.getPlayerIcons
(UUID player) Retrieves the icons for a given player.withClickHandler
(Function<MenuClickHandler, Boolean> clickHandler) Sets the click handler for the page.withColumn
(UUID player, int menuRows, int startingRow, int endingRow, int column, IconBuilder iconBuilder) Adds the specifiedIconBuilder
to the specified column for a player.withColumn
(UUID player, int menuRows, int startingRow, int column, IconBuilder iconBuilder) Adds the specifiedIconBuilder
to the specified column for a player.withColumn
(UUID player, int menuRows, int column, IconBuilder iconBuilder) Adds the specifiedIconBuilder
to the specified column for a player.Adds icons to the page for a player.Sets the open handler for the page.withRow
(UUID player, int row, int startingColumn, int endingColumn, IconBuilder iconBuilder) Adds the specifiedIconBuilder
to the specified row for a player.withRow
(UUID player, int row, int startingColumn, IconBuilder iconBuilder) Adds the specifiedIconBuilder
to the specified row for a player.withRow
(UUID player, int row, IconBuilder iconBuilder) Adds the specifiedIconBuilder
to the specified row for a player.
-
Field Details
-
playerIcons
-
clickHandler
-
open
-
pageNumber
private final int pageNumber
-
-
Constructor Details
-
PlayerPageBuilder
public PlayerPageBuilder(int pageNumber)
-
-
Method Details
-
withClickHandler
Sets the click handler for the page.- Parameters:
clickHandler
- The click handler to be set for the page.- Returns:
- This
PlayerPageBuilder
instance for method chaining.
-
withOpenHandler
Sets the open handler for the page.- Parameters:
open
- The open handler to be set for the page.- Returns:
- This
PlayerPageBuilder
instance for method chaining.
-
build
Builds and returns thePlayerInstancePage
instance based on the provided configuration.- Returns:
- The constructed
PlayerInstancePage
instance.
-
getPlayerIcons
Retrieves the icons for a given player.- Parameters:
player
- The UUID of the player.- Returns:
- A map of icon slots to Icon objects.