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:
@@ -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());
|
||||
|
||||
@@ -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();
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user