Class IntegrationManager
java.lang.Object
me.remigio07.chatplugin.api.common.integration.IntegrationManager
- All Implemented Interfaces:
ChatPluginManager
Manager that handles
ChatPluginIntegration
s.- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic IntegrationManager
Gets 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 correspondingChatPluginIntegration
s' instances, which may either be enabled or not (ChatPluginIntegration.isEnabled()
).boolean
Checks if
.IntegrationType.MATRIX
.isEnabled() ||IntegrationType.VULCAN
.isEnabled() ||IntegrationType.NEGATIVITY
.isEnabled()boolean
Checks if this manager is enabled.boolean
Checks if this manager will be reloaded on a plugin reload.void
unload()
Unloads this manager.Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods 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:ChatPluginManager
Unloads this manager.Will do nothing if this method is not overridden.
- Specified by:
unload
in interfaceChatPluginManager
- Throws:
ChatPluginManagerException
- If something goes wrong
-
isEnabled
public boolean isEnabled()Description copied from interface:ChatPluginManager
Checks if this manager is enabled.- Specified by:
isEnabled
in interfaceChatPluginManager
- Returns:
- Whether this manager is enabled
-
isReloadable
public boolean isReloadable()Description copied from interface:ChatPluginManager
Checks if this manager will be reloaded on a plugin reload.Will return
true
if this method is not overridden.- Specified by:
isReloadable
in interfaceChatPluginManager
- Returns:
- Whether this manager is reloadable
-
getIntegrations
Gets the integrations map, where the keys areIntegrationType.getSupportedIntegrations()
and the values are the correspondingChatPluginIntegration
s' instances, which may either be enabled or not (ChatPluginIntegration.isEnabled()
).- Returns:
- Integrations map
-
getIntegration
Gets an integration's instance.Will return
null
if!
.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
false
if!
isEnabled()
.- Returns:
- Whether at least one anti cheat is enabled
-
getInstance
Gets this manager's instance.- Returns:
- Manager's instance
-