Class PlaceholderManager
- All Implemented Interfaces:
Runnable,ChatPluginManager
- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic PlaceholderManagerGets this manager's instance.longGets the update task's ID.booleanChecks if this manager is enabled.abstract voidrun()Storage's placeholders updater, called once everysettings.storage-placeholders-update-timeoutin config.yml.translateIntegrationsPlaceholders(String input, ChatPluginServerPlayer player) Translates an input string withPlaceholderType.INTEGRATIONSplaceholders, formatted for the specified player and translated for the player's language.translateIntegrationsPlaceholders(String input, ChatPluginServerPlayer player, Language language) Translates an input string withPlaceholderType.INTEGRATIONSplaceholders, formatted for the specified player and translated for the specified language.abstract StringtranslateIntegrationsPlaceholders(String input, ChatPluginServerPlayer player, Language language, boolean translateColors) Translates an input string withPlaceholderType.INTEGRATIONSplaceholders, formatted for the specified player and translated for the specified language.translateIntegrationsPlaceholders(List<String> input, ChatPluginServerPlayer player) Translates an input string list withPlaceholderType.INTEGRATIONSplaceholders, formatted for the specified player and translated for the player's language.translateIntegrationsPlaceholders(List<String> input, ChatPluginServerPlayer player, Language language) Translates an input string list withPlaceholderType.INTEGRATIONSplaceholders, formatted for the specified player and translated for the specified language.translatePlaceholders(String input, ChatPluginServerPlayer player, List<PlaceholderType> placeholderTypes) Translates an input string with placeholders, formatted for the specified player and translated for the player's language.translatePlaceholders(String input, ChatPluginServerPlayer player, Language language, List<PlaceholderType> placeholderTypes) Translates an input string with placeholders, formatted for the specified player and translated for the specified language.abstract StringtranslatePlaceholders(String input, ChatPluginServerPlayer player, Language language, List<PlaceholderType> placeholderTypes, boolean translateColors) Translates an input string with placeholders, formatted for the specified player and translated for the specified language.translatePlaceholders(List<String> input, ChatPluginServerPlayer player, List<PlaceholderType> placeholderTypes) Translates an input string list with placeholders, formatted for the specified player and translated for the player's language.translatePlaceholders(List<String> input, ChatPluginServerPlayer player, Language language, List<PlaceholderType> placeholderTypes) Translates an input string list with placeholders, formatted for the specified player and translated for the specified language.translatePlayerPlaceholders(String input, ChatPluginServerPlayer player) Translates an input string withPlaceholderType.PLAYERplaceholders, formatted for the specified player and translated for the player's language.translatePlayerPlaceholders(String input, ChatPluginServerPlayer player, Language language) Translates an input string withPlaceholderType.PLAYERplaceholders, specified player and translated for the specified language.abstract StringtranslatePlayerPlaceholders(String input, ChatPluginServerPlayer player, Language language, boolean translateColors) Translates an input string withPlaceholderType.PLAYERplaceholders, formatted for the specified player and translated for the specified language.translatePlayerPlaceholders(List<String> input, ChatPluginServerPlayer player) Translates an input string list withPlaceholderType.PLAYERplaceholders, formatted for the specified player and translated for the player's language.translatePlayerPlaceholders(List<String> input, ChatPluginServerPlayer player, Language language) Translates an input string list withPlaceholderType.PLAYERplaceholders, formatted for the specified player and translated for the specified language.translateServerPlaceholders(String input, Language language) Translates an input string withPlaceholderType.SERVERplaceholders, translated for the specified language.abstract StringtranslateServerPlaceholders(String input, Language language, boolean translateColors) Translates an input string withPlaceholderType.SERVERplaceholders, translated for the specified language.translateServerPlaceholders(List<String> input, Language language) Translates an input string list withPlaceholderType.SERVERplaceholders, translated for the specified language.Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface me.remigio07.chatplugin.api.common.util.manager.ChatPluginManager
checkAvailability, isReloadable, load, reload, unload
-
Constructor Details
-
PlaceholderManager
public PlaceholderManager()
-
-
Method Details
-
isEnabled
public boolean isEnabled()Description copied from interface:ChatPluginManagerChecks if this manager is enabled.- Specified by:
isEnabledin interfaceChatPluginManager- Returns:
- Whether this manager is enabled
-
getTimerTaskID
public long getTimerTaskID()Gets the update task's ID.You can interact with it through
TaskManager's methods.- Returns:
- Update task's ID
-
translatePlaceholders
public String translatePlaceholders(String input, ChatPluginServerPlayer player, List<PlaceholderType> placeholderTypes) Translates an input string with placeholders, formatted for the specified player and translated for the player's language.You have to indicate what placeholder types you need for the string to be translated. Color and formatting codes are already translated.
- Parameters:
input- Input containing placeholdersplayer- Player whose placeholders need to be translatedplaceholderTypes- Placeholder types present in the input- Returns:
- Translated placeholders
- See Also:
-
translatePlaceholders
public String translatePlaceholders(String input, ChatPluginServerPlayer player, Language language, List<PlaceholderType> placeholderTypes) Translates an input string with placeholders, formatted for the specified player and translated for the specified language.You have to indicate what placeholder types you need for the string to be translated. Color and formatting codes are already translated.
- Parameters:
input- Input containing placeholdersplayer- Player whose placeholders need to be translatedlanguage- Language used to translate the placeholdersplaceholderTypes- Placeholder types present in the input- Returns:
- Translated placeholders
- See Also:
-
translatePlaceholders
public List<String> translatePlaceholders(List<String> input, ChatPluginServerPlayer player, List<PlaceholderType> placeholderTypes) Translates an input string list with placeholders, formatted for the specified player and translated for the player's language.You have to indicate what placeholder types you need for the string to be translated. Color and formatting codes are already translated.
- Parameters:
input- Input containing placeholdersplayer- Player whose placeholders need to be translatedplaceholderTypes- Placeholder types present in the input- Returns:
- Translated placeholders
- See Also:
-
translatePlaceholders
public List<String> translatePlaceholders(List<String> input, ChatPluginServerPlayer player, Language language, List<PlaceholderType> placeholderTypes) Translates an input string list with placeholders, formatted for the specified player and translated for the specified language.You have to indicate what placeholder types you need for the string to be translated. Color and formatting codes are already translated.
- Parameters:
input- Input containing placeholdersplayer- Player whose placeholders need to be translatedlanguage- Language used to translate the placeholdersplaceholderTypes- Placeholder types present in the input- Returns:
- Translated placeholders
- See Also:
-
translatePlayerPlaceholders
Translates an input string withPlaceholderType.PLAYERplaceholders, formatted for the specified player and translated for the player's language.Color and formatting codes are already translated.
- Parameters:
input- Input containing placeholdersplayer- Player whose placeholders need to be translated- Returns:
- Translated placeholders
- See Also:
-
translatePlayerPlaceholders
public String translatePlayerPlaceholders(String input, ChatPluginServerPlayer player, Language language) Translates an input string withPlaceholderType.PLAYERplaceholders, specified player and translated for the specified language.Color and formatting codes are already translated.
- Parameters:
input- Input containing placeholdersplayer- Player whose placeholders need to be translatedlanguage- Language used to translate the placeholders- Returns:
- Translated placeholders
- See Also:
-
translatePlayerPlaceholders
Translates an input string list withPlaceholderType.PLAYERplaceholders, formatted for the specified player and translated for the player's language.Color and formatting codes are already translated.
- Parameters:
input- Input containing placeholdersplayer- Player whose placeholders need to be translated- Returns:
- Translated placeholders
- See Also:
-
translatePlayerPlaceholders
public List<String> translatePlayerPlaceholders(List<String> input, ChatPluginServerPlayer player, Language language) Translates an input string list withPlaceholderType.PLAYERplaceholders, formatted for the specified player and translated for the specified language.Color and formatting codes are already translated.
- Parameters:
input- Input containing placeholdersplayer- Player whose placeholders need to be translatedlanguage- Language used to translate the placeholders- Returns:
- Translated placeholders
- See Also:
-
translateServerPlaceholders
Translates an input string withPlaceholderType.SERVERplaceholders, translated for the specified language.Color and formatting codes are already translated.
- Parameters:
input- Input containing placeholderslanguage- Language used to translate the placeholders- Returns:
- Translated placeholders
- See Also:
-
translateServerPlaceholders
Translates an input string list withPlaceholderType.SERVERplaceholders, translated for the specified language.Color and formatting codes are already translated.
- Parameters:
input- Input containing placeholderslanguage- Language used to translate the placeholders- Returns:
- Translated placeholders
- See Also:
-
translateIntegrationsPlaceholders
Translates an input string withPlaceholderType.INTEGRATIONSplaceholders, formatted for the specified player and translated for the player's language.Color and formatting codes are already translated.
- Parameters:
input- Input containing placeholdersplayer- Player whose placeholders need to be translated- Returns:
- Translated placeholders
- See Also:
-
translateIntegrationsPlaceholders
public String translateIntegrationsPlaceholders(String input, ChatPluginServerPlayer player, Language language) Translates an input string withPlaceholderType.INTEGRATIONSplaceholders, formatted for the specified player and translated for the specified language.Color and formatting codes are already translated.
- Parameters:
input- Input containing placeholdersplayer- Player whose placeholders need to be translatedlanguage- Language used to translate the placeholders- Returns:
- Translated placeholders
- See Also:
-
translateIntegrationsPlaceholders
public List<String> translateIntegrationsPlaceholders(List<String> input, ChatPluginServerPlayer player) Translates an input string list withPlaceholderType.INTEGRATIONSplaceholders, formatted for the specified player and translated for the player's language.Color and formatting codes are already translated.
- Parameters:
input- Input containing placeholdersplayer- Player whose placeholders need to be translated- Returns:
- Translated placeholders
- See Also:
-
translateIntegrationsPlaceholders
public List<String> translateIntegrationsPlaceholders(List<String> input, ChatPluginServerPlayer player, Language language) Translates an input string list withPlaceholderType.INTEGRATIONSplaceholders, formatted for the specified player and translated for the specified language.Color and formatting codes are already translated.
- Parameters:
input- Input containing placeholdersplayer- Player whose placeholders need to be translatedlanguage- Language used to translate the placeholders- Returns:
- Translated placeholders
- See Also:
-
getInstance
Gets this manager's instance.- Returns:
- Manager's instance
-
run
public abstract void run()Storage's placeholders updater, called once everysettings.storage-placeholders-update-timeoutin config.yml. -
translatePlaceholders
public abstract String translatePlaceholders(String input, ChatPluginServerPlayer player, Language language, List<PlaceholderType> placeholderTypes, boolean translateColors) Translates an input string with placeholders, formatted for the specified player and translated for the specified language.You have to indicate what placeholder types you need for the string to be translated.
- Parameters:
input- Input containing placeholdersplayer- Player whose placeholders need to be translatedlanguage- Language used to translate the placeholdersplaceholderTypes- Placeholder types present in the inputtranslateColors- Whether toChatColor.translate(String)the output- Returns:
- Translated placeholders
- See Also:
-
translatePlayerPlaceholders
public abstract String translatePlayerPlaceholders(String input, ChatPluginServerPlayer player, Language language, boolean translateColors) Translates an input string withPlaceholderType.PLAYERplaceholders, formatted for the specified player and translated for the specified language.- Parameters:
input- Input containing placeholdersplayer- Player whose placeholders need to be translatedlanguage- Language used to translate the placeholderstranslateColors- Whether toChatColor.translate(String)the output- Returns:
- Translated placeholders
- See Also:
-
translateServerPlaceholders
public abstract String translateServerPlaceholders(String input, Language language, boolean translateColors) Translates an input string withPlaceholderType.SERVERplaceholders, translated for the specified language.- Parameters:
input- Input containing placeholderslanguage- Language used to translate the placeholderstranslateColors- Whether toChatColor.translate(String)the output- Returns:
- Translated placeholders
- See Also:
-
translateIntegrationsPlaceholders
public abstract String translateIntegrationsPlaceholders(String input, ChatPluginServerPlayer player, Language language, boolean translateColors) Translates an input string withPlaceholderType.INTEGRATIONSplaceholders, formatted for the specified player and translated for the specified language.- Parameters:
input- Input containing placeholdersplayer- Player whose placeholders need to be translatedlanguage- Language used to translate the placeholderstranslateColors- Whether toChatColor.translate(String)the output- Returns:
- Translated placeholders
- See Also:
-