Interface SignInputBuilder


public interface SignInputBuilder
Builder for creating Sign-based text input GUIs.
  • Method Details

    • initialText

      @NotNull @NotNull SignInputBuilder initialText(@NotNull @NotNull String text)
      Sets the initial text in the edit line (Line 2).
      Parameters:
      text - the initial text
      Returns:
      this builder
    • description

      @NotNull @NotNull SignInputBuilder description(@NotNull @NotNull String description)
      Sets the short description shown on Line 4 of the sign.
      Parameters:
      description - the description
      Returns:
      this builder
    • maxLength

      @NotNull @NotNull SignInputBuilder maxLength(int limit)
      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

      @NotNull @NotNull SignInputBuilder closePolicy(@NotNull @NotNull ClosePolicy policy)
      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