Class KeyValuePlaceholder
java.lang.Object
ua.mcchickenstudio.opencreative.coding.placeholders.Placeholder
ua.mcchickenstudio.opencreative.coding.placeholders.KeyValuePlaceholder
- All Implemented Interfaces:
ExtensionContent
- Direct Known Subclasses:
ListPlaceholder,VarPlaceholder
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionString[]getKeys()static PatternbooleanReturnstrueif specified text contains placeholders that can be parsed with this class.@NotNull Stringparse(String text, ActionsHandler handler, Action action) Returns text with parsed placeholders from this class.abstract @Nullable StringparseKeyValue(String key, String value, ActionsHandler handler, Action action) Methods inherited from class ua.mcchickenstudio.opencreative.coding.placeholders.Placeholder
toStringMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface ua.mcchickenstudio.opencreative.coding.ExtensionContent
getDescription, getExtensionId, getName
-
Constructor Details
-
KeyValuePlaceholder
-
-
Method Details
-
getPattern
-
getKeys
-
parseKeyValue
@Nullable public abstract @Nullable String parseKeyValue(String key, String value, ActionsHandler handler, Action action) -
matches
Description copied from class:PlaceholderReturnstrueif specified text contains placeholders that can be parsed with this class.- Specified by:
matchesin classPlaceholder- Parameters:
text- text to check.- Returns:
- true - placeholders detected, false - not detected.
-
parse
Description copied from class:PlaceholderReturns text with parsed placeholders from this class.- Specified by:
parsein classPlaceholder- Parameters:
text- text to parse.handler- action handler.action- action.- Returns:
- parsed text
-