Package org.yuemi.libs.api.gui
Interface SignInputBuilder
public interface SignInputBuilder
Builder for creating Sign-based text input GUIs.
-
Method Summary
Modifier and TypeMethodDescription@NotNull SignInputBuilderclosePolicy(@NotNull ClosePolicy policy) Sets the close policy for this Sign GUI.@NotNull SignInputBuilderdescription(@NotNull String description) Sets the short description shown on Line 4 of the sign.@NotNull SignInputBuilderinitialText(@NotNull String text) Sets the initial text in the edit line (Line 2).@NotNull SignInputBuildermaxLength(int limit) Sets the maximum character limit for the input.@NotNull SignInputBuilderonSubmit(@NotNull BiConsumer<org.bukkit.entity.Player, String> callback) Sets the callback executed when the player finishes editing the sign.voidopen(@NotNull org.bukkit.entity.Player player) Opens the sign editor for the specified player.
-
Method Details
-
initialText
Sets the initial text in the edit line (Line 2).- Parameters:
text- the initial text- Returns:
- this builder
-
description
Sets the short description shown on Line 4 of the sign.- Parameters:
description- the description- Returns:
- this builder
-
maxLength
Sets the maximum character limit for the input.- Parameters:
limit- the max character length- Returns:
- this builder
-
onSubmit
@NotNull @NotNull SignInputBuilder onSubmit(@NotNull @NotNull BiConsumer<org.bukkit.entity.Player, String> callback) Sets the callback executed when the player finishes editing the sign. The callback receives the player and the typed text from Line 2.- Parameters:
callback- the submit callback- Returns:
- this builder
-
closePolicy
Sets the close policy for this Sign GUI.- Parameters:
policy- the close policy- Returns:
- this builder
-
open
void open(@NotNull @NotNull org.bukkit.entity.Player player) Opens the sign editor for the specified player.- Parameters:
player- the player
-