Class TextInputGUI.AbstractBuilder<B extends TextInputGUI.AbstractBuilder<B,G,P>,G extends TextInputGUI,P extends org.bukkit.plugin.java.JavaPlugin>
java.lang.Object
de.placeblock.betterinventories.Builder<B,G>
de.placeblock.betterinventories.gui.GUI.Builder<B,G,P>
de.placeblock.betterinventories.gui.impl.BaseAnvilGUI.AbstractBuilder<B,G,P>
de.placeblock.betterinventories.gui.impl.textinput.TextInputGUI.AbstractBuilder<B,G,P>
- Type Parameters:
B- The Builder that implements this oneG- The GUI that is builtP- 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 Summary
ConstructorsConstructorDescriptionAbstractBuilder(P plugin, org.bukkit.entity.Player player) Creates a new Builder -
Method Summary
Modifier and TypeMethodDescriptiononFinish(FinishConsumer onFinish) Sets the onFinish attributeSets the onUpdate attributeSets the text attributetitleConverter(Function<String, net.kyori.adventure.text.TextComponent> titleConverter) Sets the titleConverter attributeMethods inherited from class de.placeblock.betterinventories.gui.impl.BaseAnvilGUI.AbstractBuilder
additionalItem, inputItem, resultItemMethods inherited from class de.placeblock.betterinventories.gui.GUI.Builder
removeItems, title, type
-
Constructor Details
-
AbstractBuilder
Creates a new Builder- Parameters:
plugin- The plugin that uses this builderplayer- The player this GUI belongs to
-
-
Method Details
-
text
Sets the text attribute- Parameters:
text- The text that is shown in the anvil at the beginning- Returns:
- Itself
-
onFinish
Sets the onFinish attribute- Parameters:
onFinish- Is executed if the text is submitted- Returns:
- Itself
-
onUpdate
Sets the onUpdate attribute- Parameters:
onUpdate- Is executed if the text is updated- Returns:
- Itself
-
titleConverter
Sets the titleConverter attribute- Parameters:
titleConverter- Is called to convert the current text to the title of the submit item- Returns:
- Itself
-