public interface HookProvider
The HookProvider interface defines the contract for creating hooks
to integrate with other plugins.
-
Method Summary
Creates and returns an instance of the Hook for the specified plugin.
@NotNull String
Gets the description of the plugin.
String
Gets the name of the plugin that this hook is associated with.
@NotNull String
Gets the URL of the plugin (e.g., for documentation or downloads).
boolean
Checks whether the target component is available on the platform.
boolean
Checks whether this HookProvider is compatible with the current platform.
boolean
Checks whether this HookProvider itself is enabled.
void
Sets the description of the plugin.
void
void
Sets the URL of the plugin.
-
Method Details
-
createHook
Creates and returns an instance of the Hook for the specified plugin.
- Returns:
- a new Hook instance.
-
getName
String getName()
Gets the name of the plugin that this hook is associated with.
- Returns:
- the name of the plugin as a String.
-
getDescription
@NotNull
@NotNull String getDescription()
Gets the description of the plugin.
- Returns:
- the plugin description as a String.
-
setDescription
void setDescription(@NotNull
@NotNull String description)
Sets the description of the plugin.
- Parameters:
-
description - the plugin description to set.
-
getUrl
@NotNull
@NotNull String getUrl()
Gets the URL of the plugin (e.g., for documentation or downloads).
- Returns:
- the plugin URL as a String.
-
setUrl
void setUrl(@NotNull
@NotNull String url)
Sets the URL of the plugin.
- Parameters:
-
url - the plugin URL to set.
-
isEnabled
boolean isEnabled()
Checks whether this HookProvider itself is enabled.
If this returns false, the provider will not create new hooks.
- Returns:
- true if the HookProvider is enabled, false otherwise.
-
isAvailable
boolean isAvailable()
Checks whether the target component is available on the platform.
- Returns:
- true if the plugin is installed, false otherwise.
-
isCompatible
boolean isCompatible()
Checks whether this HookProvider is compatible with the current platform.
This can include checking API versions or required dependencies.
- Returns:
- true if the plugin is compatible, false otherwise.
-
-