Class PluginHook
java.lang.Object
us.talabrek.ultimateskyblock.hook.PluginHook
- Direct Known Subclasses:
EconomyHook
,MultiverseHook
,PermissionsHook
-
Constructor Summary
ConstructorDescriptionPluginHook
(@NotNull uSkyBlock plugin, @NotNull String hookName, @NotNull String implementing) PluginHook constructor. -
Method Summary
-
Constructor Details
-
PluginHook
public PluginHook(@NotNull @NotNull uSkyBlock plugin, @NotNull @NotNull String hookName, @NotNull @NotNull String implementing) PluginHook constructor.- Parameters:
plugin
- uSkyBlock instancehookName
- The name of this plugin hook.implementing
- The name of the actual plugin that this hook will implement.
-
-
Method Details
-
onHook
Called when the hook is enabled. ThrowsHookFailedException
if the hooking fails.- Throws:
HookFailedException
- if hooking fails.
-
onUnhook
Called when the hook is disabled. ThrowsHookFailedException
if the unhooking fails.- Throws:
HookFailedException
- if unhooking fails.
-
getHookName
Gets the configured name of this hook.- Returns:
- Hook name
-
getImplementing
Gets the name of the plugin that this hook implements.- Returns:
- Name of the plugin that this hook implements.
-