Class RandomPlaceholder
java.lang.Object
ua.mcchickenstudio.opencreative.coding.placeholders.Placeholder
ua.mcchickenstudio.opencreative.coding.placeholders.KeyPlaceholder
ua.mcchickenstudio.opencreative.coding.placeholders.RandomPlaceholder
- All Implemented Interfaces:
ExtensionContent
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescription@NotNull StringReturns description of extension content.@NotNull StringReturns lower-cased simple id of extension.@NotNull StringgetName()Returns name of extension content.@Nullable StringparseKey(String key, ActionsHandler handler, Action action) Parses placeholder key, without %.Methods inherited from class KeyPlaceholder
getKeys, getPatternPlaceholder, matches, parseModifier and TypeMethodDescriptionString[]getKeys()Returns array of keys that can be replaced, without %.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.Methods inherited from class Placeholder
toString
-
Constructor Details
-
RandomPlaceholder
public RandomPlaceholder()
-
-
Method Details
-
parseKey
Description copied from class:KeyPlaceholderParses placeholder key, without %.- Specified by:
parseKeyin classKeyPlaceholder- Parameters:
key- key to replace.handler- action handler.action- action- Returns:
- string - if parsed, or null - nothing parsed.
-
getExtensionId
Description copied from interface:ExtensionContentReturns lower-cased simple id of extension. Will be used to identify author of content.ID "default" is reserved for OpenCreative+ developers.
- Returns:
- id of extension.
-
getName
Description copied from interface:ExtensionContentReturns name of extension content. Will be displayed in list of extension content.- Returns:
- name of content.
-
getDescription
Description copied from interface:ExtensionContentReturns description of extension content. Describes purpose of new additional content.- Returns:
- description of content.
-