Class TextInputGUI.AbstractBuilder<B extends TextInputGUI.AbstractBuilder<B,G,P>,G extends TextInputGUI,P extends org.bukkit.plugin.java.JavaPlugin>

Type Parameters:
P - The plugin that uses this builder
Direct Known Subclasses:
TextInputGUI.Builder
Enclosing class:
TextInputGUI

public abstract static class TextInputGUI.AbstractBuilder<B extends TextInputGUI.AbstractBuilder<B,G,P>,G extends TextInputGUI,P extends org.bukkit.plugin.java.JavaPlugin> extends BaseAnvilGUI.AbstractBuilder<B,G,P>
Abstract Builder for creating TextInputGUI
  • Constructor Details

    • AbstractBuilder

      public AbstractBuilder(P plugin, org.bukkit.entity.Player player)
      Creates a new Builder
      Parameters:
      plugin - The plugin that uses this builder
      player - The player this GUI belongs to
  • Method Details

    • text

      public B text(String text)
      Sets the text attribute
      Parameters:
      text - The text that is shown in the anvil at the beginning
      Returns:
      Itself
    • onFinish

      public B onFinish(FinishConsumer onFinish)
      Sets the onFinish attribute
      Parameters:
      onFinish - Is executed if the text is submitted
      Returns:
      Itself
    • onUpdate

      public B onUpdate(Consumer<String> onUpdate)
      Sets the onUpdate attribute
      Parameters:
      onUpdate - Is executed if the text is updated
      Returns:
      Itself
    • titleConverter

      public B titleConverter(Function<String,net.kyori.adventure.text.TextComponent> titleConverter)
      Sets the titleConverter attribute
      Parameters:
      titleConverter - Is called to convert the current text to the title of the submit item
      Returns:
      Itself