9
0
mirror of https://github.com/HibiscusMC/HMCCosmetics.git synced 2025-12-29 20:09:13 +00:00

feat: add support for Eco item lookup system

This commit is contained in:
LoJoSho
2023-12-18 13:19:43 -06:00
parent de5b9be6ac
commit 7ff4fbb3d7
4 changed files with 23 additions and 0 deletions

View File

@@ -31,6 +31,7 @@ public class Hooks {
private static final HookLibsDisguises LIBS_DISGUISES_HOOK = new HookLibsDisguises();
private static final HookModelEngine MODEL_ENGINE_HOOK = new HookModelEngine();
private static final HookMMOItems MMO_ITEMS_HOOK = new HookMMOItems();
private static final HookEco ECO_ITEMS_HOOK = new HookEco();
public static Hook getHook(@NotNull String id) {
return hooks.get(id.toLowerCase());

View File

@@ -0,0 +1,18 @@
package com.hibiscusmc.hmccosmetics.hooks.items;
import com.hibiscusmc.hmccosmetics.hooks.Hook;
import com.willfp.eco.core.items.Items;
import org.bukkit.inventory.ItemStack;
import org.jetbrains.annotations.NotNull;
public class HookEco extends Hook {
public HookEco() {
super("Eco");
setEnabledItemHook(true);
}
@Override
public ItemStack getItem(@NotNull String itemId) {
return Items.lookup(itemId).getItem();
}
}