Rewrite map hooks, use more modern APIs

This commit is contained in:
William278 committed 2023-03-22 12:12:53 +00:00
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;
}
}