mirror of
https://github.com/darksaid98/HuskHomes.git
synced 2026-12-02 14:38:52 +00:00
Rewrite map hooks, use more modern APIs
This commit is contained in:
1 parent
167d5d6c7a
commit
98fa779046
15 files changed
+457
-463
No files matched your search
@@ -0,0 +1,42 @@
|
||||
package net.william278.huskhomes.hook;
|
||||
|
||||
import net.william278.huskhomes.HuskHomes;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
|
||||
/**
|
||||
* A plugin hook, where HuskHomes hooks into another plugin
|
||||
*/
|
||||
public abstract class Hook {
|
||||
|
||||
/**
|
||||
* The plugin that this hook is for
|
||||
*/
|
||||
protected final HuskHomes plugin;
|
||||
|
||||
/**
|
||||
* The name of the hook
|
||||
*/
|
||||
protected final String name;
|
||||
|
||||
/**
|
||||
* Construct a new {@link Hook}
|
||||
*
|
||||
* @param plugin the {@link HuskHomes} instance
|
||||
*/
|
||||
protected Hook(@NotNull HuskHomes plugin, @NotNull String name) {
|
||||
this.plugin = plugin;
|
||||
this.name = name;
|
||||
}
|
||||
|
||||
/**
|
||||
* Initialize the hook and return {@code true} if it could be enabled
|
||||
*/
|
||||
public abstract void initialize() ;
|
||||
|
||||
@NotNull
|
||||
public String getName() {
|
||||
return name;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
Reference in new issue
Block a user