Interface PlaceholderContext.Builder
- All Superinterfaces:
- AbstractBuilder<PlaceholderContext>,- Builder<PlaceholderContext,,- PlaceholderContext.Builder> - ResettableBuilder<PlaceholderContext,- PlaceholderContext.Builder> 
- Enclosing interface:
- PlaceholderContext
public static interface PlaceholderContext.Builder
extends Builder<PlaceholderContext,PlaceholderContext.Builder> 
A builder for 
PlaceholderComponent objects.- 
Method SummaryModifier and TypeMethodDescriptionargumentString(@Nullable String string) Sets a string that represents variables for the supplied token.associatedObject(@Nullable Object object) Sets theObjectto use as a source of information for thisPlaceholderComponent.associatedObject(@Nullable Supplier<Object> supplier) Sets theObjectto use as a source of information for thisPlaceholderComponent.default PlaceholderContext.BuilderassociatedObject(Player player) Sets theObjectto use as a source of information for thisPlaceholderComponentto the suppliedPlayer.build()Builds and returns the placeholder.
- 
Method Details- 
associatedObjectSets theObjectto use as a source of information for thisPlaceholderComponentto the suppliedPlayer.- Parameters:
- player- The player to associate this text with.
- Returns:
- This, for chaining
- See Also:
 
- 
associatedObjectSets theObjectto use as a source of information for thisPlaceholderComponent. Ifnull, removes this source.If you are intending to keep the associated PlaceholderComponentfor any period of time and that you wish to associate a game object with the placeholder, useassociatedObject(Supplier)instead, supplying a function that can recreate the object if necessary.If supplying a Player, useassociatedObject(Player), which will handle creating the correct supplier for you.- Parameters:
- object- The- Objectto associate this text with.
- Returns:
- This, for chaining
- See Also:
 
- 
associatedObjectSets theObjectto use as a source of information for thisPlaceholderComponent. Ifnull, removes this source.
- 
argumentStringSets a string that represents variables for the supplied token. The format of this argument string is dependent on the parser that consumes this string and thus is not prescribed here.- Parameters:
- string- The argument string, may be null to reset to the default argument string
- Returns:
- This, for chaining
- See Also:
 
- 
buildBuilds and returns the placeholder.- Specified by:
- buildin interface- AbstractBuilder<PlaceholderContext>
- Returns:
- The appropriate PlaceholderComponent
- Throws:
- IllegalStateException- if the builder has not been completed, or the associated- PlaceholderParsercould not validate the built- PlaceholderComponent, if applicable.
 
 
-