mirror of
https://github.com/HibiscusMC/HibiscusCommons.git
synced 2025-12-19 15:09:26 +00:00
feat: set hooks as active when they really are
This commit is contained in:
@@ -10,8 +10,11 @@ import org.jetbrains.annotations.Nullable;
|
|||||||
* Represents a hook into other minecraft plugins
|
* Represents a hook into other minecraft plugins
|
||||||
*/
|
*/
|
||||||
public abstract class Hook implements Listener {
|
public abstract class Hook implements Listener {
|
||||||
|
|
||||||
private final String id;
|
private final String id;
|
||||||
|
|
||||||
private boolean active = false;
|
private boolean active = false;
|
||||||
|
|
||||||
private boolean itemHook = false;
|
private boolean itemHook = false;
|
||||||
private boolean entityHook = false;
|
private boolean entityHook = false;
|
||||||
|
|
||||||
@@ -27,6 +30,7 @@ public abstract class Hook implements Listener {
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
Hooks.addHook(this);
|
Hooks.addHook(this);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -35,10 +39,11 @@ public abstract class Hook implements Listener {
|
|||||||
*
|
*
|
||||||
* @implNote By default, this method does nothing. It should be overridden by child classes to implement any necessary loading logic
|
* @implNote By default, this method does nothing. It should be overridden by child classes to implement any necessary loading logic
|
||||||
*/
|
*/
|
||||||
public void load() { }
|
public void load() {}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Gets an {@link ItemStack} that is associated with the provided id from the hooked plugin
|
* Gets an {@link ItemStack} that is associated with the provided id from the hooked plugin
|
||||||
|
*
|
||||||
* @param itemId The id of the {@link ItemStack}
|
* @param itemId The id of the {@link ItemStack}
|
||||||
* @return The {@link ItemStack} with the id provided. If an invalid id was provided or if the hook doesn't have any related {@link ItemStack}s then this will return null
|
* @return The {@link ItemStack} with the id provided. If an invalid id was provided or if the hook doesn't have any related {@link ItemStack}s then this will return null
|
||||||
* @implNote By default, this method returns null. It should be overridden by child classes if you will to have your hook return a related {@link ItemStack}
|
* @implNote By default, this method returns null. It should be overridden by child classes if you will to have your hook return a related {@link ItemStack}
|
||||||
@@ -60,6 +65,7 @@ public abstract class Hook implements Listener {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Gets whether this hook has been activated
|
* Gets whether this hook has been activated
|
||||||
|
*
|
||||||
* @return true if this hook is active, false otherwise
|
* @return true if this hook is active, false otherwise
|
||||||
* @deprecated As of release 2.2.5+, replaced by {@link #isActive()}
|
* @deprecated As of release 2.2.5+, replaced by {@link #isActive()}
|
||||||
*/
|
*/
|
||||||
@@ -70,6 +76,7 @@ public abstract class Hook implements Listener {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Gets whether this hook has been activated
|
* Gets whether this hook has been activated
|
||||||
|
*
|
||||||
* @return true if this hook is active, false otherwise
|
* @return true if this hook is active, false otherwise
|
||||||
* @since 2.2.5
|
* @since 2.2.5
|
||||||
*/
|
*/
|
||||||
@@ -79,16 +86,21 @@ public abstract class Hook implements Listener {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Sets whether this hook is active
|
* Sets whether this hook is active
|
||||||
|
*
|
||||||
* @param active true to activate the hook, false otherwise
|
* @param active true to activate the hook, false otherwise
|
||||||
*/
|
*/
|
||||||
public final void setActive(boolean active) {
|
public final void setActive(boolean active) {
|
||||||
this.active = active;
|
this.active = active;
|
||||||
|
|
||||||
|
if (active) {
|
||||||
|
Hooks.checkHookLoadingStatus();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Whether the method {@link #getItem(String)} should return a non-null value
|
* Whether the method {@link #getItem(String)} should return a non-null value
|
||||||
* @return true if {@link #getItem(String)} should return a non-null value, false otherwise
|
|
||||||
*
|
*
|
||||||
|
* @return true if {@link #getItem(String)} should return a non-null value, false otherwise
|
||||||
* @apiNote Even though this method returns true does not mean that {@link #getItem(String)} won't return null, rather if this returns false then {@link #getItem(String)} should return false everytime
|
* @apiNote Even though this method returns true does not mean that {@link #getItem(String)} won't return null, rather if this returns false then {@link #getItem(String)} should return false everytime
|
||||||
*/
|
*/
|
||||||
public final boolean hasEnabledItemHook() {
|
public final boolean hasEnabledItemHook() {
|
||||||
@@ -101,6 +113,7 @@ public abstract class Hook implements Listener {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Sets whether the method {@link #getItem(String)} should return a non-null value
|
* Sets whether the method {@link #getItem(String)} should return a non-null value
|
||||||
|
*
|
||||||
* @param enabled true if {@link #getItem(String)} should return a non-null value, false otherwise
|
* @param enabled true if {@link #getItem(String)} should return a non-null value, false otherwise
|
||||||
*/
|
*/
|
||||||
public final void setEnabledItemHook(boolean enabled) {
|
public final void setEnabledItemHook(boolean enabled) {
|
||||||
|
|||||||
@@ -3,6 +3,7 @@ package me.lojosho.hibiscuscommons.hooks;
|
|||||||
import me.clip.placeholderapi.PlaceholderAPI;
|
import me.clip.placeholderapi.PlaceholderAPI;
|
||||||
import me.clip.placeholderapi.expansion.PlaceholderExpansion;
|
import me.clip.placeholderapi.expansion.PlaceholderExpansion;
|
||||||
import me.lojosho.hibiscuscommons.HibiscusCommonsPlugin;
|
import me.lojosho.hibiscuscommons.HibiscusCommonsPlugin;
|
||||||
|
import me.lojosho.hibiscuscommons.api.events.AllHooksActiveEvent;
|
||||||
import me.lojosho.hibiscuscommons.hooks.items.*;
|
import me.lojosho.hibiscuscommons.hooks.items.*;
|
||||||
import me.lojosho.hibiscuscommons.hooks.misc.*;
|
import me.lojosho.hibiscuscommons.hooks.misc.*;
|
||||||
import me.lojosho.hibiscuscommons.hooks.placeholders.HookPlaceholderAPI;
|
import me.lojosho.hibiscuscommons.hooks.placeholders.HookPlaceholderAPI;
|
||||||
@@ -15,10 +16,12 @@ import org.jetbrains.annotations.NotNull;
|
|||||||
import org.jetbrains.annotations.Nullable;
|
import org.jetbrains.annotations.Nullable;
|
||||||
|
|
||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
|
import java.util.Map;
|
||||||
|
|
||||||
public class Hooks {
|
public class Hooks {
|
||||||
|
|
||||||
private static final HashMap<String, Hook> hooks = new HashMap<>();
|
private static final HashMap<String, Hook> HOOK_POOL = new HashMap<>();
|
||||||
|
|
||||||
private static final HookNexo NEXO_HOOK = new HookNexo();
|
private static final HookNexo NEXO_HOOK = new HookNexo();
|
||||||
private static final HookOraxen ORAXEN_HOOK = new HookOraxen();
|
private static final HookOraxen ORAXEN_HOOK = new HookOraxen();
|
||||||
private static final HookItemAdder ITEMADDER_HOOK = new HookItemAdder();
|
private static final HookItemAdder ITEMADDER_HOOK = new HookItemAdder();
|
||||||
@@ -37,16 +40,19 @@ public class Hooks {
|
|||||||
private static final HookCustomFishing CF_HOOK = new HookCustomFishing();
|
private static final HookCustomFishing CF_HOOK = new HookCustomFishing();
|
||||||
private static final HookGSit GSIT_HOOK = new HookGSit();
|
private static final HookGSit GSIT_HOOK = new HookGSit();
|
||||||
|
|
||||||
|
private static final Map<String, Hook> HOOKED = new HashMap<>();
|
||||||
|
private static boolean allHooksActive = false;
|
||||||
|
|
||||||
public static Hook getHook(@NotNull String id) {
|
public static Hook getHook(@NotNull String id) {
|
||||||
return hooks.get(id.toLowerCase());
|
return HOOK_POOL.get(id.toLowerCase());
|
||||||
}
|
}
|
||||||
|
|
||||||
public static boolean isItemHook(@NotNull String id) {
|
public static boolean isItemHook(@NotNull String id) {
|
||||||
return hooks.containsKey(id.toLowerCase());
|
return HOOK_POOL.containsKey(id.toLowerCase());
|
||||||
}
|
}
|
||||||
|
|
||||||
public static void addHook(Hook hook) {
|
public static void addHook(Hook hook) {
|
||||||
hooks.put(hook.getId().toLowerCase(), hook);
|
HOOK_POOL.put(hook.getId().toLowerCase(), hook);
|
||||||
}
|
}
|
||||||
|
|
||||||
public static void addPlaceholderAPI(PlaceholderExpansion expansion) {
|
public static void addPlaceholderAPI(PlaceholderExpansion expansion) {
|
||||||
@@ -63,16 +69,38 @@ public class Hooks {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public static void setup() {
|
public static void setup() {
|
||||||
for (Hook hook : hooks.values()) {
|
for (Hook hook : HOOK_POOL.values()) {
|
||||||
if (Bukkit.getPluginManager().getPlugin(hook.getId()) != null) {
|
if (Bukkit.getPluginManager().getPlugin(hook.getId()) != null) {
|
||||||
HibiscusCommonsPlugin.getInstance().getServer().getPluginManager().registerEvents(hook, HibiscusCommonsPlugin.getInstance());
|
HibiscusCommonsPlugin.getInstance().getServer().getPluginManager().registerEvents(hook, HibiscusCommonsPlugin.getInstance());
|
||||||
hook.setActive(true);
|
|
||||||
hook.load();
|
hook.load();
|
||||||
|
|
||||||
|
HOOKED.put(hook.getId(), hook);
|
||||||
|
|
||||||
HibiscusCommonsPlugin.getInstance().getLogger().info("Successfully hooked into " + hook.getId());
|
HibiscusCommonsPlugin.getInstance().getLogger().info("Successfully hooked into " + hook.getId());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Checks if all hooked hooks are actually active
|
||||||
|
* so {@link AllHooksActiveEvent} is called.
|
||||||
|
* This is an operation that occurs only once to allow plugins
|
||||||
|
* load their stuff successfully when all hooks are active.
|
||||||
|
*/
|
||||||
|
static void checkHookLoadingStatus() {
|
||||||
|
if (allHooksActive) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!HOOKED.values().stream()
|
||||||
|
.allMatch(Hook::isActive)) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
allHooksActive = true;
|
||||||
|
Bukkit.getPluginManager().callEvent(new AllHooksActiveEvent());
|
||||||
|
}
|
||||||
|
|
||||||
@Nullable
|
@Nullable
|
||||||
public static ItemStack getItem(@NotNull String raw) {
|
public static ItemStack getItem(@NotNull String raw) {
|
||||||
if (!raw.contains(":")) {
|
if (!raw.contains(":")) {
|
||||||
@@ -93,7 +121,7 @@ public class Hooks {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public static String getStringItem(ItemStack itemStack) {
|
public static String getStringItem(ItemStack itemStack) {
|
||||||
for (Hook hook : hooks.values()) {
|
for (Hook hook : HOOK_POOL.values()) {
|
||||||
if (hook.isActive() && hook.hasEnabledItemHook()) {
|
if (hook.isActive() && hook.hasEnabledItemHook()) {
|
||||||
String stringyItem = hook.getItemString(itemStack);
|
String stringyItem = hook.getItemString(itemStack);
|
||||||
if (stringyItem == null) continue;
|
if (stringyItem == null) continue;
|
||||||
@@ -104,7 +132,7 @@ public class Hooks {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public static String getStringEntity(Entity entity) {
|
public static String getStringEntity(Entity entity) {
|
||||||
for (Hook hook : hooks.values()) {
|
for (Hook hook : HOOK_POOL.values()) {
|
||||||
if (hook.isActive() && hook.hasEnabledEntityHook()) {
|
if (hook.isActive() && hook.hasEnabledEntityHook()) {
|
||||||
String stringyEntity = hook.getEntityString(entity);
|
String stringyEntity = hook.getEntityString(entity);
|
||||||
if (stringyEntity != null) return hook.getId() + ":" + stringyEntity;
|
if (stringyEntity != null) return hook.getId() + ":" + stringyEntity;
|
||||||
|
|||||||
@@ -14,6 +14,7 @@ import org.jetbrains.annotations.NotNull;
|
|||||||
public class HookDenizen extends Hook {
|
public class HookDenizen extends Hook {
|
||||||
public HookDenizen() {
|
public HookDenizen() {
|
||||||
super("denizen", HookFlag.ITEM_SUPPORT);
|
super("denizen", HookFlag.ITEM_SUPPORT);
|
||||||
|
setActive(true);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -9,6 +9,7 @@ import org.jetbrains.annotations.NotNull;
|
|||||||
public class HookEco extends Hook {
|
public class HookEco extends Hook {
|
||||||
public HookEco() {
|
public HookEco() {
|
||||||
super("Eco", HookFlag.ITEM_SUPPORT);
|
super("Eco", HookFlag.ITEM_SUPPORT);
|
||||||
|
setActive(true);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|||||||
@@ -21,6 +21,7 @@ public class HookGeary extends Hook {
|
|||||||
|
|
||||||
public HookGeary() {
|
public HookGeary() {
|
||||||
super("geary", HookFlag.ITEM_SUPPORT);
|
super("geary", HookFlag.ITEM_SUPPORT);
|
||||||
|
setActive(true);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -21,7 +21,6 @@ import org.jetbrains.annotations.NotNull;
|
|||||||
*/
|
*/
|
||||||
@SuppressWarnings("SpellCheckingInspection")
|
@SuppressWarnings("SpellCheckingInspection")
|
||||||
public class HookItemAdder extends Hook {
|
public class HookItemAdder extends Hook {
|
||||||
private boolean enabled = false;
|
|
||||||
|
|
||||||
public HookItemAdder() {
|
public HookItemAdder() {
|
||||||
super("itemsadder", HookFlag.ITEM_SUPPORT);
|
super("itemsadder", HookFlag.ITEM_SUPPORT);
|
||||||
@@ -32,7 +31,7 @@ public class HookItemAdder extends Hook {
|
|||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public ItemStack getItem(@NotNull String itemId) {
|
public ItemStack getItem(@NotNull String itemId) {
|
||||||
if (enabled) {
|
if (isActive()) {
|
||||||
CustomStack stack = CustomStack.getInstance(itemId);
|
CustomStack stack = CustomStack.getInstance(itemId);
|
||||||
if (stack == null) return null;
|
if (stack == null) return null;
|
||||||
return stack.getItemStack().clone();
|
return stack.getItemStack().clone();
|
||||||
@@ -43,10 +42,13 @@ public class HookItemAdder extends Hook {
|
|||||||
|
|
||||||
@EventHandler(priority = EventPriority.MONITOR)
|
@EventHandler(priority = EventPriority.MONITOR)
|
||||||
public void onItemAdderDataLoad(ItemsAdderLoadDataEvent event) {
|
public void onItemAdderDataLoad(ItemsAdderLoadDataEvent event) {
|
||||||
HibiscusHookReload.ReloadType reloadType = enabled ? HibiscusHookReload.ReloadType.RELOAD : HibiscusHookReload.ReloadType.INITIAL;
|
HibiscusHookReload.ReloadType type = HibiscusHookReload.ReloadType.RELOAD;
|
||||||
this.enabled = true;
|
if (!isActive()) {
|
||||||
HibiscusHookReload newEvent = new HibiscusHookReload(this, reloadType);
|
type = HibiscusHookReload.ReloadType.INITIAL;
|
||||||
Bukkit.getPluginManager().callEvent(newEvent);
|
setActive(true);
|
||||||
|
}
|
||||||
|
|
||||||
|
Bukkit.getPluginManager().callEvent(new HibiscusHookReload(this, type));
|
||||||
}
|
}
|
||||||
|
|
||||||
@EventHandler(priority = EventPriority.MONITOR)
|
@EventHandler(priority = EventPriority.MONITOR)
|
||||||
@@ -69,7 +71,14 @@ public class HookItemAdder extends Hook {
|
|||||||
return CustomStack.byItemStack(itemStack).getId();
|
return CustomStack.byItemStack(itemStack).getId();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Checks if ItemsAdder hook is enabled
|
||||||
|
* @return whether ItemsAdder hook is enabled or not
|
||||||
|
* @deprecated as you can just check if the hook is active
|
||||||
|
* by calling {@link #isActive()}
|
||||||
|
*/
|
||||||
|
@Deprecated
|
||||||
public boolean getIAEnabled() {
|
public boolean getIAEnabled() {
|
||||||
return enabled;
|
return isActive();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -9,6 +9,7 @@ import org.jetbrains.annotations.NotNull;
|
|||||||
public class HookMMOItems extends Hook {
|
public class HookMMOItems extends Hook {
|
||||||
public HookMMOItems() {
|
public HookMMOItems() {
|
||||||
super("MMOItems", HookFlag.ITEM_SUPPORT);
|
super("MMOItems", HookFlag.ITEM_SUPPORT);
|
||||||
|
setActive(true);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|||||||
@@ -9,16 +9,17 @@ import org.bukkit.inventory.ItemStack;
|
|||||||
import org.jetbrains.annotations.NotNull;
|
import org.jetbrains.annotations.NotNull;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* A hook that integrates the plugin {@link io.lumine.mythic.bukkit.MythicBukkit MythicBukkit} to provide custom items
|
* A hook that integrates the plugin {@link MythicBukkit MythicBukkit} to provide custom items
|
||||||
*/
|
*/
|
||||||
@SuppressWarnings("SpellCheckingInspection")
|
@SuppressWarnings("SpellCheckingInspection")
|
||||||
public class HookMythic extends Hook {
|
public class HookMythic extends Hook {
|
||||||
public HookMythic() {
|
public HookMythic() {
|
||||||
super("mythicmobs", HookFlag.ITEM_SUPPORT, HookFlag.ENTITY_SUPPORT);
|
super("mythicmobs", HookFlag.ITEM_SUPPORT, HookFlag.ENTITY_SUPPORT);
|
||||||
|
setActive(true);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Gets a cosmetic {@link ItemStack} that is associated with the provided id from the plugin {@link io.lumine.mythic.bukkit.MythicBukkit MythicBukkit}
|
* Gets a cosmetic {@link ItemStack} that is associated with the provided id from the plugin {@link MythicBukkit MythicBukkit}
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public ItemStack getItem(@NotNull String itemId) {
|
public ItemStack getItem(@NotNull String itemId) {
|
||||||
|
|||||||
@@ -17,7 +17,7 @@ import org.jetbrains.annotations.NotNull;
|
|||||||
*/
|
*/
|
||||||
@SuppressWarnings("SpellCheckingInspection")
|
@SuppressWarnings("SpellCheckingInspection")
|
||||||
public class HookNexo extends Hook {
|
public class HookNexo extends Hook {
|
||||||
private boolean enabled = false;
|
|
||||||
public HookNexo() {
|
public HookNexo() {
|
||||||
super("nexo", HookFlag.ITEM_SUPPORT);
|
super("nexo", HookFlag.ITEM_SUPPORT);
|
||||||
}
|
}
|
||||||
@@ -27,7 +27,7 @@ public class HookNexo extends Hook {
|
|||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public ItemStack getItem(@NotNull String itemId) {
|
public ItemStack getItem(@NotNull String itemId) {
|
||||||
return NexoItems.optionalItemFromId(itemId).map(ItemBuilder::build).orElse(enabled ? new ItemStack(Material.AIR) : null);
|
return NexoItems.optionalItemFromId(itemId).map(ItemBuilder::build).orElse(isActive() ? new ItemStack(Material.AIR) : null);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@@ -39,9 +39,12 @@ public class HookNexo extends Hook {
|
|||||||
|
|
||||||
@EventHandler
|
@EventHandler
|
||||||
public void onLoadItems(NexoItemsLoadedEvent event) {
|
public void onLoadItems(NexoItemsLoadedEvent event) {
|
||||||
HibiscusHookReload.ReloadType reloadType = enabled ? HibiscusHookReload.ReloadType.RELOAD : HibiscusHookReload.ReloadType.INITIAL;
|
HibiscusHookReload.ReloadType type = HibiscusHookReload.ReloadType.RELOAD;
|
||||||
this.enabled = true;
|
if (!isActive()) {
|
||||||
HibiscusHookReload newEvent = new HibiscusHookReload(this, reloadType);
|
type = HibiscusHookReload.ReloadType.INITIAL;
|
||||||
Bukkit.getPluginManager().callEvent(newEvent);
|
setActive(true);
|
||||||
|
}
|
||||||
|
|
||||||
|
Bukkit.getPluginManager().callEvent(new HibiscusHookReload(this, type));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -14,6 +14,7 @@ import org.jetbrains.annotations.NotNull;
|
|||||||
public class HookOraxen extends Hook {
|
public class HookOraxen extends Hook {
|
||||||
public HookOraxen() {
|
public HookOraxen() {
|
||||||
super("oraxen", HookFlag.ITEM_SUPPORT);
|
super("oraxen", HookFlag.ITEM_SUPPORT);
|
||||||
|
setActive(true);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -16,6 +16,7 @@ import org.jetbrains.annotations.NotNull;
|
|||||||
public class HookCMI extends Hook {
|
public class HookCMI extends Hook {
|
||||||
public HookCMI() {
|
public HookCMI() {
|
||||||
super("CMI");
|
super("CMI");
|
||||||
|
setActive(true);
|
||||||
}
|
}
|
||||||
|
|
||||||
@EventHandler(priority = EventPriority.MONITOR, ignoreCancelled = true)
|
@EventHandler(priority = EventPriority.MONITOR, ignoreCancelled = true)
|
||||||
|
|||||||
@@ -12,6 +12,7 @@ public class HookCustomFishing extends Hook {
|
|||||||
|
|
||||||
public HookCustomFishing() {
|
public HookCustomFishing() {
|
||||||
super("CustomFishing");
|
super("CustomFishing");
|
||||||
|
setActive(true);
|
||||||
}
|
}
|
||||||
|
|
||||||
@EventHandler(priority = EventPriority.MONITOR, ignoreCancelled = true)
|
@EventHandler(priority = EventPriority.MONITOR, ignoreCancelled = true)
|
||||||
|
|||||||
@@ -12,6 +12,7 @@ public class HookGSit extends Hook {
|
|||||||
|
|
||||||
public HookGSit() {
|
public HookGSit() {
|
||||||
super("GSit");
|
super("GSit");
|
||||||
|
setActive(true);
|
||||||
}
|
}
|
||||||
|
|
||||||
@EventHandler(ignoreCancelled = true, priority = EventPriority.LOW)
|
@EventHandler(ignoreCancelled = true, priority = EventPriority.LOW)
|
||||||
|
|||||||
@@ -6,5 +6,6 @@ import me.lojosho.hibiscuscommons.hooks.Hook;
|
|||||||
public class HookHMCColor extends Hook {
|
public class HookHMCColor extends Hook {
|
||||||
public HookHMCColor() {
|
public HookHMCColor() {
|
||||||
super("HMCColor");
|
super("HMCColor");
|
||||||
|
setActive(true);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -14,6 +14,7 @@ import org.jetbrains.annotations.NotNull;
|
|||||||
public class HookLibsDisguises extends Hook {
|
public class HookLibsDisguises extends Hook {
|
||||||
public HookLibsDisguises() {
|
public HookLibsDisguises() {
|
||||||
super("LibsDisguises");
|
super("LibsDisguises");
|
||||||
|
setActive(true);
|
||||||
}
|
}
|
||||||
|
|
||||||
@EventHandler(priority = EventPriority.MONITOR, ignoreCancelled = true)
|
@EventHandler(priority = EventPriority.MONITOR, ignoreCancelled = true)
|
||||||
|
|||||||
@@ -9,6 +9,7 @@ public class HookModelEngine extends Hook {
|
|||||||
|
|
||||||
public HookModelEngine() {
|
public HookModelEngine() {
|
||||||
super("ModelEngine");
|
super("ModelEngine");
|
||||||
|
setActive(true);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|||||||
@@ -18,6 +18,7 @@ import org.jetbrains.annotations.NotNull;
|
|||||||
public class HookPremiumVanish extends Hook {
|
public class HookPremiumVanish extends Hook {
|
||||||
public HookPremiumVanish() {
|
public HookPremiumVanish() {
|
||||||
super("PremiumVanish");
|
super("PremiumVanish");
|
||||||
|
setActive(true);
|
||||||
}
|
}
|
||||||
|
|
||||||
@EventHandler(priority = EventPriority.NORMAL, ignoreCancelled = true)
|
@EventHandler(priority = EventPriority.NORMAL, ignoreCancelled = true)
|
||||||
|
|||||||
@@ -18,6 +18,7 @@ import org.jetbrains.annotations.NotNull;
|
|||||||
public class HookSuperVanish extends Hook {
|
public class HookSuperVanish extends Hook {
|
||||||
public HookSuperVanish() {
|
public HookSuperVanish() {
|
||||||
super("SuperVanish");
|
super("SuperVanish");
|
||||||
|
setActive(true);
|
||||||
}
|
}
|
||||||
|
|
||||||
@EventHandler(priority = EventPriority.NORMAL, ignoreCancelled = true)
|
@EventHandler(priority = EventPriority.NORMAL, ignoreCancelled = true)
|
||||||
|
|||||||
@@ -11,6 +11,7 @@ public class HookPlaceholderAPI extends Hook {
|
|||||||
|
|
||||||
public HookPlaceholderAPI() {
|
public HookPlaceholderAPI() {
|
||||||
super("PlaceholderAPI");
|
super("PlaceholderAPI");
|
||||||
|
setActive(true);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void registerPlaceholder(PlaceholderExpansion placeholderExpansion) {
|
public void registerPlaceholder(PlaceholderExpansion placeholderExpansion) {
|
||||||
|
|||||||
Reference in New Issue
Block a user