Class TextInputGUI.Builder<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.Builder<TextInputGUI.Builder<P>,TextInputGUI,P>
de.placeblock.betterinventories.gui.impl.textinput.TextInputGUI.Builder<P>
- Type Parameters:
P- The plugin that uses this builder
- Enclosing class:
- TextInputGUI
public static class TextInputGUI.Builder<P extends org.bukkit.plugin.java.JavaPlugin>
extends BaseAnvilGUI.Builder<TextInputGUI.Builder<P>,TextInputGUI,P>
Builder for creating
TextInputGUI-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbuild()Builds the instanceonFinish(FinishConsumer onFinish) Sets the onFinish attributeSets the onUpdate attributeprotected TextInputGUI.Builder<P>self()Returns the Builder instance itselfSets the text attributetitleConverter(Function<String, net.kyori.adventure.text.TextComponent> titleConverter) Sets the titleConverter attributeMethods inherited from class de.placeblock.betterinventories.gui.impl.BaseAnvilGUI.Builder
additionalItem, inputItem, resultItemMethods inherited from class de.placeblock.betterinventories.gui.GUI.Builder
removeItems, title, type
-
Constructor Details
-
Builder
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
public TextInputGUI.Builder<P> 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
-
build
Description copied from class:BuilderBuilds the instance- Specified by:
buildin classBuilder<TextInputGUI.Builder<P extends org.bukkit.plugin.java.JavaPlugin>,TextInputGUI> - Returns:
- The new instance
-
self
Description copied from class:BuilderReturns the Builder instance itself- Specified by:
selfin classBuilder<TextInputGUI.Builder<P extends org.bukkit.plugin.java.JavaPlugin>,TextInputGUI> - Returns:
- the Builder instance itself
-