mirror of
https://github.com/darksaid98/HuskHomes.git
synced 2026-12-02 06:28:49 +00:00
Add /rtp with normal distribution, economy hook, home limits, new tests, locales
This commit is contained in:
1 parent
0bb33c6f1e
commit
08e6569027
39 files changed
+1128
-188
No files matched your search
@@ -0,0 +1,46 @@
|
||||
package net.william278.huskhomes.hook;
|
||||
|
||||
import net.william278.huskhomes.HuskHomes;
|
||||
import net.william278.huskhomes.HuskHomesInitializationException;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
|
||||
/**
|
||||
* A plugin hook, where HuskHomes hooks into another plugin
|
||||
*/
|
||||
public abstract class PluginHook {
|
||||
|
||||
/**
|
||||
* The plugin that this hook is for
|
||||
*/
|
||||
protected final HuskHomes plugin;
|
||||
|
||||
/**
|
||||
* The name of the hook
|
||||
*/
|
||||
protected final String hookName;
|
||||
|
||||
/**
|
||||
* Construct a new {@link PluginHook}
|
||||
*
|
||||
* @param implementor the {@link HuskHomes} instance
|
||||
*/
|
||||
protected PluginHook(@NotNull HuskHomes implementor, @NotNull String hookName) {
|
||||
this.plugin = implementor;
|
||||
this.hookName = hookName;
|
||||
}
|
||||
|
||||
/**
|
||||
* Initialize the hook and return {@code true} if it could be enabled
|
||||
*
|
||||
* @return {@code true} if the hook could be enabled
|
||||
* @throws HuskHomesInitializationException if an exception occurred enabling the hook
|
||||
*/
|
||||
public abstract boolean initialize() throws HuskHomesInitializationException;
|
||||
|
||||
@NotNull
|
||||
public String getHookName() {
|
||||
return hookName;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
Reference in new issue
Block a user