Interface PlaceholderParser
-
- All Superinterfaces:
DefaultedRegistryValue
@CatalogedBy(PlaceholderParsers.class) public interface PlaceholderParser extends DefaultedRegistryValue
Provides the logic of how to parse a placeholder token.
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static interfacePlaceholderParser.BuilderA builder that createsPlaceholderParser
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Modifier and Type Method Description static PlaceholderParser.Builderbuilder()Returns aPlaceholderParser.Builderthat allows for the creation of simplePlaceholderParsers.Componentparse(PlaceholderContext placeholderContext)Creates aComponentbased on the providedPlaceholderContext.-
Methods inherited from interface org.spongepowered.api.registry.DefaultedRegistryValue
asDefaultedReference, findKey, key
-
-
-
-
Method Detail
-
builder
static PlaceholderParser.Builder builder()
Returns aPlaceholderParser.Builderthat allows for the creation of simplePlaceholderParsers.- Returns:
- The
PlaceholderParser.Builder
-
parse
Component parse(PlaceholderContext placeholderContext)
Creates aComponentbased on the providedPlaceholderContext.This method should not throw an error, instead returning
Component.empty()if the suppliedPlaceholderContextis not valid.- Parameters:
placeholderContext- ThePlaceholderContext- Returns:
- The
Component
-
-