Class JoinTitleManager
- All Implemented Interfaces:
ChatPluginManager
- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionlonggetDelay()Gets the delay to wait before sending the join title, in milliseconds.longGets the time for the join title to fade in, in milliseconds.longGets the time for the join title to fade out, in milliseconds.static JoinTitleManagerGets this manager's instance.Gets the list of placeholder types used to translategetTitles()andgetSubtitles().longgetStay()Gets the time for the join title to stay, in milliseconds.getSubtitle(Language language, boolean avoidNull) Gets the subtitle for the specified language.Gets the map of loaded subtitles.Gets the title for the specified language.Gets the map of loaded titles.booleanChecks if this manager is enabled.abstract voidsendJoinTitle(ChatPluginServerPlayer player, boolean applyDelay) Sends the join title to the specified player.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
-
JoinTitleManager
public JoinTitleManager()
-
-
Method Details
-
isEnabled
public boolean isEnabled()Checks if this manager is enabled.Found at: "join-quit-modules.join-titles.settings.enabled" in
ConfigurationType.JOIN_QUIT_MODULES- Specified by:
isEnabledin interfaceChatPluginManager- Returns:
- Whether this manager is enabled
-
getFadeIn
public long getFadeIn()Gets the time for the join title to fade in, in milliseconds.Found at: "join-quit-modules.join-titles.settings.fade-in-ms" in
ConfigurationType.JOIN_QUIT_MODULES- Returns:
- Time to fade in
-
getStay
public long getStay()Gets the time for the join title to stay, in milliseconds.Found at: "join-quit-modules.join-titles.settings.stay-ms" in
ConfigurationType.JOIN_QUIT_MODULES- Returns:
- Time to stay
-
getFadeOut
public long getFadeOut()Gets the time for the join title to fade out, in milliseconds.Found at: "join-quit-modules.join-titles.settings.fade-out-ms" in
ConfigurationType.JOIN_QUIT_MODULES- Returns:
- Time to fade out
-
getDelay
public long getDelay()Gets the delay to wait before sending the join title, in milliseconds.Found at: "join-quit-modules.join-titles.settings.delay-ms" in
ConfigurationType.JOIN_QUIT_MODULES- Returns:
- Delay to wait
-
getPlaceholderTypes
Gets the list of placeholder types used to translategetTitles()andgetSubtitles().Found at: "join-quit-modules.join-titles.settings.placeholder-types" in
ConfigurationType.JOIN_QUIT_MODULES- Returns:
- Placeholders used to translate join titles
-
getTitles
Gets the map of loaded titles.You may modify the returned map, but it cannot point to a
nullvalue forLanguage.getMainLanguage().Found at: "join-quit-modules.join-titles.titles" in
ConfigurationType.JOIN_QUIT_MODULES- Returns:
- Loaded titles' map
-
getTitle
Gets the title for the specified language.Specify
trueasavoidNullto fall back toLanguage.getMainLanguage()'s title if no title is present for the specified language. Will returnnullifgetTitles().get(language) == null && !avoidNull.- Parameters:
language- Language used to translate the titleavoidNull- Whether to avoid returningnull- Returns:
- Loaded title
-
getSubtitles
Gets the map of loaded subtitles.You may modify the returned map, but it cannot point to a
nullvalue forLanguage.getMainLanguage().Found at: "join-quit-modules.join-titles.subtitles" in
ConfigurationType.JOIN_QUIT_MODULES- Returns:
- Loaded subtitles' map
-
getSubtitle
Gets the subtitle for the specified language.Specify
trueasavoidNullto fall back toLanguage.getMainLanguage()'s subtitle if no subtitle is present for the specified language. Will returnnullifgetSubtitles().get(language) == null && !avoidNull.- Parameters:
language- Language used to translate the subtitleavoidNull- Whether to avoid returningnull- Returns:
- Loaded subtitle
-
getInstance
Gets this manager's instance.- Returns:
- Manager's instance
-
sendJoinTitle
Sends the join title to the specified player.- Parameters:
player- Player to send the join title toapplyDelay- Whether to waitgetDelay()
-