Class IntegrationManager
java.lang.Object
me.remigio07.chatplugin.api.common.integration.IntegrationManager
- All Implemented Interfaces:
ChatPluginManager
Manager that handles
ChatPluginIntegrations.- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic IntegrationManagerGets this manager's instance.<T extends ChatPluginIntegration>
TgetIntegration(IntegrationType<T> type) Gets an integration's instance.Gets the integrations map, where the keys areIntegrationType.getSupportedIntegrations()and the values are the correspondingChatPluginIntegrations' instances, which may either be enabled or not (ChatPluginIntegration.isEnabled()).booleanChecks if.IntegrationType.MATRIX.isEnabled() ||IntegrationType.VULCAN.isEnabled() ||IntegrationType.NEGATIVITY.isEnabled()booleanChecks if this manager is enabled.booleanChecks if this manager will be reloaded on a plugin reload.voidunload()Unloads this manager.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, load, reload
-
Constructor Details
-
IntegrationManager
public IntegrationManager()
-
-
Method Details
-
unload
Description copied from interface:ChatPluginManagerUnloads this manager.Will do nothing if this method is not overridden.
- Specified by:
unloadin interfaceChatPluginManager- Throws:
ChatPluginManagerException- If something goes wrong
-
isEnabled
public boolean isEnabled()Description copied from interface:ChatPluginManagerChecks if this manager is enabled.- Specified by:
isEnabledin interfaceChatPluginManager- Returns:
- Whether this manager is enabled
-
isReloadable
public boolean isReloadable()Description copied from interface:ChatPluginManagerChecks if this manager will be reloaded on a plugin reload.Will return
trueif this method is not overridden.- Specified by:
isReloadablein interfaceChatPluginManager- Returns:
- Whether this manager is reloadable
-
getIntegrations
Gets the integrations map, where the keys areIntegrationType.getSupportedIntegrations()and the values are the correspondingChatPluginIntegrations' instances, which may either be enabled or not (ChatPluginIntegration.isEnabled()).- Returns:
- Integrations map
-
getIntegration
Gets an integration's instance.Will return
nullif!.IntegrationType.getSupportedEnvironments().contains(Environment.getCurrent())- Type Parameters:
T- Integration's type- Parameters:
type- Integration's type- Returns:
- Integration's instance
-
isAtLeastOneAnticheatEnabled
public boolean isAtLeastOneAnticheatEnabled()Checks if.IntegrationType.MATRIX.isEnabled() ||IntegrationType.VULCAN.isEnabled() ||IntegrationType.NEGATIVITY.isEnabled()Will return
falseif!isEnabled().- Returns:
- Whether at least one anti cheat is enabled
-
getInstance
Gets this manager's instance.- Returns:
- Manager's instance
-