mirror of
https://github.com/HibiscusMC/HMCCosmetics.git
synced 2025-12-30 20:39:13 +00:00
add looty support
This commit is contained in:
@@ -11,6 +11,7 @@ public class ItemHooks {
|
||||
|
||||
private static HashMap<String, ItemHook> itemHooks = new HashMap<>();
|
||||
private static OraxenHook ORAXEN_HOOK = new OraxenHook();
|
||||
private static LootyHook LOOTY_HOOK = new LootyHook();
|
||||
private static ItemAdderHook ITEMADDER_HOOK = new ItemAdderHook();
|
||||
private static MythicHook MYTHIC_HOOK = new MythicHook();
|
||||
private static HMCCosmeticsHook HMCCOSMETIC_HOOK = new HMCCosmeticsHook();
|
||||
|
||||
@@ -0,0 +1,20 @@
|
||||
package com.hibiscusmc.hmccosmetics.hooks.items;
|
||||
|
||||
import com.mineinabyss.geary.prefabs.PrefabKey;
|
||||
import com.mineinabyss.looty.LootyFactory;
|
||||
import io.th0rgal.oraxen.api.OraxenItems;
|
||||
import org.bukkit.event.Listener;
|
||||
import org.bukkit.inventory.ItemStack;
|
||||
|
||||
public class LootyHook extends ItemHook implements Listener {
|
||||
|
||||
public LootyHook() {
|
||||
super("looty");
|
||||
}
|
||||
|
||||
@Override
|
||||
public ItemStack get(String itemid) {
|
||||
if (itemid.split(":").length != 2) return null;
|
||||
return LootyFactory.INSTANCE.createFromPrefab(PrefabKey.Companion.of(itemid));
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user