Interface ITextFactory
- All Known Implementing Classes:
ITextFactory.SimpleTextFactory, TextFactorySpigot
public interface ITextFactory
Factory class that can be used to create new
Text instances.
Certain things like colors and styles are set differently in different platforms. This factory allows for easy creation of texts that are styled according to the platform.
If you only need unstyled texts, you can use getSimpleTextFactory(). This will return a simple factory that
only creates unstyled texts.
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic final classRepresents a very simplyITextFactorythat only creates unstyled texts. -
Method Summary
Modifier and TypeMethodDescriptionstatic ITextFactoryGets a simpleITextFactorythat only produces unstyled texts.default TextnewText()newText(@Nullable PersonalizedLocalizer personalizedLocalizer) Creates a newTextinstance.
-
Method Details
-
newText
Creates a newTextinstance.- Parameters:
personalizedLocalizer- the string localizer to use for this text.- Returns:
- The new text instance.
-
newText
-
getSimpleTextFactory
Gets a simpleITextFactorythat only produces unstyled texts.
-