Class StaffChatManager
java.lang.Object
me.remigio07.chatplugin.api.server.chat.StaffChatManager
- All Implemented Interfaces:
ChatPluginManager
Manager that handles the Staff chat.
- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidAdds a player togetPlayers().voidClearsgetPlayers().Gets the chat format displayed to Staff members and the console when the console sends a message using the Staff chat.static StaffChatManagerGets this manager's instance.Gets the list of placeholder types used to translate messages sent using the Staff chat.Gets the chat format displayed to Staff members and the console when players send a message using the Staff chat.Gets the list of who has the Staff chat mode enabled.booleanChecks if this manager is enabled.booleanisUsingStaffChat(UUID player) Checks if the specified player has the Staff chat mode enabled.voidremovePlayer(UUID player) Removes a player fromgetPlayers().abstract voidsendConsoleMessage(String message) Makes the console send a message using the Staff chat.abstract voidsendPlayerMessage(ChatPluginServerPlayer player, String message) Makes a player send a message using the Staff chat.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
-
StaffChatManager
public StaffChatManager()
-
-
Method Details
-
isEnabled
public boolean isEnabled()Checks if this manager is enabled.Found at: "chat.staff-chat.enabled" in
ConfigurationType.CHAT- Specified by:
isEnabledin interfaceChatPluginManager- Returns:
- Whether this manager is enabled
-
getPlayerFormat
Gets the chat format displayed to Staff members and the console when players send a message using the Staff chat.Found at: "chat.staff-chat.format.player" in
ConfigurationType.CHAT- Returns:
- Players' format
-
getConsoleFormat
Gets the chat format displayed to Staff members and the console when the console sends a message using the Staff chat.Found at: "chat.staff-chat.format.console" in
ConfigurationType.CHAT- Returns:
- Console's format
-
getPlaceholderTypes
Gets the list of placeholder types used to translate messages sent using the Staff chat.Found at: "chat.staff-chat.placeholder-types" in
ConfigurationType.CHAT- Returns:
- Placeholders used to translate messages
-
getPlayers
Gets the list of who has the Staff chat mode enabled.Do not modify the returned list. Use
addPlayer(UUID),removePlayer(UUID),clearPlayers()andisUsingStaffChat(UUID)to interact with it.- Returns:
- Staff chat's users' list
-
addPlayer
Adds a player togetPlayers().- Parameters:
player- Player to add
-
removePlayer
Removes a player fromgetPlayers().- Parameters:
player- Player to remove
-
clearPlayers
public void clearPlayers()ClearsgetPlayers(). -
isUsingStaffChat
Checks if the specified player has the Staff chat mode enabled.- Parameters:
player- Player to check- Returns:
- Whether the specified player is using the Staff chat
-
getInstance
Gets this manager's instance.- Returns:
- Manager's instance
-
sendPlayerMessage
Makes a player send a message using the Staff chat.- Parameters:
player- Message's sendermessage- Message to send- See Also:
-
sendConsoleMessage
Makes the console send a message using the Staff chat.- Parameters:
message- Message to send- Throws:
IllegalStateException- If!Environment.isProxy()&&ProxyManager.isEnabled()&&PlayerAdapter.getOnlinePlayers().isEmpty()- See Also:
-