Add /rtp with normal distribution, economy hook, home limits, new tests, locales

This commit is contained in:
William committed 2022-08-19 19:44:07 +01:00
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;
}
}