Package com.djrapitops.plan.component
Class ComponentSvc
java.lang.Object
com.djrapitops.plan.component.ComponentSvc
- All Implemented Interfaces:
ComponentService
Implementation for
ComponentService.-
Nested Class Summary
Nested classes/interfaces inherited from interface com.djrapitops.plan.component.ComponentService
ComponentService.Holder -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionconvert(Component component, ComponentOperation operation) convert(Component component, ComponentOperation operation, char inputCharacter) fromAdventureLegacy(String adventureLegacy, char character) Converts the given input into aComponent.fromAutoDetermine(String unknown) Converts the given input into aComponent.fromBungeeLegacy(String bungeeLegacy, char character) Converts the given input into aComponent.Converts the given input into aComponent.fromLegacy(String legacy, char character) Converts the given input into aComponent.fromMiniMessage(String miniMessage) Converts the given input into aComponent.voidregister()translateLegacy(String input, char inputCharacter, char outputCharacter) Translates ampersands into section signs for color codes.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.djrapitops.plan.component.ComponentService
fromAdventureLegacy, fromBungeeLegacy, fromLegacy, translateLegacy
-
Constructor Details
-
ComponentSvc
@Inject public ComponentSvc()
-
-
Method Details
-
translateLegacy
Description copied from interface:ComponentServiceTranslates ampersands into section signs for color codes. Example:&ctextto§ctext.- Specified by:
translateLegacyin interfaceComponentService- Parameters:
input- the input color string with color codes using ampersands (&)inputCharacter- the input character for translation, usually&.outputCharacter- the output character for translation, usually§.- Returns:
- the same input string with input characters for color codes replaced with output characters
- See Also:
-
convert
-
convert
-
fromAutoDetermine
Description copied from interface:ComponentServiceConverts the given input into aComponent. Converts an unknown format legacy/minimessage string into a component by attempting to guess the input format.- Specified by:
fromAutoDeterminein interfaceComponentService- Parameters:
unknown- the unknown format input string- Returns:
- a
Component
-
fromLegacy
Description copied from interface:ComponentServiceConverts the given input into aComponent. Input example§ctext.- Specified by:
fromLegacyin interfaceComponentService- Parameters:
legacy- the input legacycharacter- the character to use as the color prefix, usually§.- Returns:
- a
Component - See Also:
-
fromAdventureLegacy
Description copied from interface:ComponentServiceConverts the given input into aComponent. Input example:&#rrggbbtext.- Specified by:
fromAdventureLegacyin interfaceComponentService- Parameters:
adventureLegacy- the input adventure legacycharacter- the character to use as the color prefix, usually&.- Returns:
- a
Component - See Also:
-
fromBungeeLegacy
Description copied from interface:ComponentServiceConverts the given input into aComponent. Input example:§x§r§r§g§g§b§btext.- Specified by:
fromBungeeLegacyin interfaceComponentService- Parameters:
bungeeLegacy- the input bungee legacycharacter- the character to use as the color prefix, usually§.- Returns:
- a
Component - See Also:
-
fromMiniMessage
Description copied from interface:ComponentServiceConverts the given input into aComponent. Input example:<red>text</red>.- Specified by:
fromMiniMessagein interfaceComponentService- Parameters:
miniMessage- the input minimessage- Returns:
- a
Component
-
fromJson
Description copied from interface:ComponentServiceConverts the given input into aComponent. Input example:{text:"text",color:"red"}(standard Minecraft json).- Specified by:
fromJsonin interfaceComponentService- Parameters:
json- the input json- Returns:
- a
Component
-
register
public void register()
-