Interface HookAPI
- 
Method SummaryModifier and TypeMethodDescriptionstatic HookAPIget()Returns the global HookAPI instance.String[]Returns the names of all plugin with which we can create a hook.Get all currently registered cloud system hooks.getHooks()Gets all hooks that currently are active.getHooksByHooked(Plugin plugin) Get all hooks that hook into the given plugin.getHooksByManaging(Plugin plugin) Get all hooks that are being managed by the given plugin.Get all currently registered nicknaming hooks.Get all currently registered parties hooks.booleanManually register a new cloud system hook.booleanManually register a new nicknaming hook.booleanManually register a new parties hook.Collection<? extends Hook> tryAutoHook(Plugin plugin) Tries to let MBedwars automatically initiate a hook with a plugin.booleanunregisterHook(Hook hook) Removes a hook.
- 
Method Details- 
getHooksCollection<Hook> getHooks()Gets all hooks that currently are active.- Returns:
- All active hooks
 
- 
getHooksByHookedGet all hooks that hook into the given plugin.- Parameters:
- plugin- The plugin into which a hook is hooking into
- Returns:
- A collection of all hooks into that plugin. Empty if there are none
 
- 
getHooksByManagingGet all hooks that are being managed by the given plugin.- Parameters:
- plugin- The plugin that created the hooks
- Returns:
- A collection of hooks that are being managed. Empty if there are none
 
- 
getAutoPluginNamesString[] getAutoPluginNames()Returns the names of all plugin with which we can create a hook.Includes names of plugins that aren't installed on the server. - Returns:
- Names of all plugins that we can hook into
- See Also:
 
- 
tryAutoHookTries to let MBedwars automatically initiate a hook with a plugin.Reasons for failure: 
 - Plugin is already hooked
 -PluginHookEventgot cancelled
 - Plugin is not supported (not hookable, version/version not supported)
 - An error occured while we tried to hook into it
 - It may only be hooked into after all arenas have been loaded
 - Plugin is not enabled- Parameters:
- plugin- The plugin with a hook shall be created
- Returns:
- A list of the hooks that we created. May be empty if there are none
- See Also:
 
- 
unregisterHookRemoves a hook.- Parameters:
- hook- The hook that shall be removed
- Returns:
- truewhen we succeded
 
- 
getPartiesHooksPartiesHook[] getPartiesHooks()Get all currently registered parties hooks.This also includes the ones that MBedwars registers (e.g. Parties, Parties and Friends ...) - Returns:
- All the currently registered parties hooks
 
- 
registerPartiesHookManually register a new parties hook.You may use unregisterHook(Hook)to remove the hook again.- Parameters:
- hook- The hook that shall be registered
- Returns:
- falseif it is already registered. Otherwise- true
- Throws:
- IllegalStateException- In case the class is incorrectly being handled
 
- 
getNicknamingHooksNicknamingHook[] getNicknamingHooks()Get all currently registered nicknaming hooks.This also includes the ones that MBedwars registers (e.g. Nicknamer, NameTagEdit, CMI ...) - Returns:
- All the currently registered nicknaming hooks
 
- 
registerNicknamingHookManually register a new nicknaming hook.You may use unregisterHook(Hook)to remove the hook again.- Parameters:
- hook- The hook that shall be registered
- Returns:
- falseif it is already registered. Otherwise- true
- Throws:
- IllegalStateException- In case the class is incorrectly being handled
 
- 
getCloudSystemHooksCloudSystemHook[] getCloudSystemHooks()Get all currently registered cloud system hooks.This also includes the ones that MBedwars registers (e.g. CloudNet, CaveCloud ...) - Returns:
- All the currently registered cloud system hooks
 
- 
registerCloudSystemHookManually register a new cloud system hook.You may use unregisterHook(Hook)to remove the hook again.- Parameters:
- hook- The hook that shall be registered
- Returns:
- falseif it is already registered. Otherwise- true
- Throws:
- IllegalStateException- In case the class is incorrectly being handled
 
- 
getReturns the global HookAPI instance.- Returns:
- The global HookAPI instance
 
 
-