mirror of
https://github.com/HibiscusMC/HMCCosmetics.git
synced 2025-12-30 12:29:16 +00:00
Fixes for IA
This commit is contained in:
@@ -41,7 +41,7 @@ public class HookManager {
|
||||
|
||||
final Map<String, ItemHook> itemHookMap = new HashMap<>();
|
||||
final OraxenHook oraxenHook = new OraxenHook();
|
||||
final ItemAdderHook = new ItemAdderHook();
|
||||
final ItemAdderHook itemAdderHook = new ItemAdderHook();
|
||||
if (pluginManager.getPlugin("Oraxen") != null) itemHookMap.put(oraxenHook.getIdentifier(), oraxenHook);
|
||||
if (pluginManager.getPlugin("ItemAdder") != null) itemHookMap.put(itemAdderHook.getIdentifier(), itemAdderHook);
|
||||
this.itemHooks = new ItemHooks(itemHookMap);
|
||||
|
||||
@@ -1,9 +1,8 @@
|
||||
package io.github.fisher2911.hmccosmetics.hook.item;
|
||||
|
||||
import dev.lone.itemsadder.api.CustomStack;
|
||||
import io.github.fisher2911.hmccosmetics.hook.Hook;
|
||||
import io.th0rgal.oraxen.items.ItemBuilder;
|
||||
import org.bukkit.inventory.ItemStack;
|
||||
import dev.lone.itemsadder.api.CustomItem;
|
||||
|
||||
public class ItemAdderHook implements ItemHook {
|
||||
|
||||
@@ -22,8 +21,8 @@ public class ItemAdderHook implements ItemHook {
|
||||
|
||||
@Override
|
||||
public ItemStack getItem(final String id) {
|
||||
final CustomItem customItem = CustomItem.getInstance("id);
|
||||
if (customItem == null) return null;
|
||||
return customItem.getItemStack();
|
||||
final CustomStack stack = CustomStack.getInstance(id);
|
||||
if ( stack == null ) return null;
|
||||
return stack.getItemStack();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user