mirror of
https://github.com/HibiscusMC/HMCCosmetics.git
synced 2025-12-28 03:19:15 +00:00
add looty support
This commit is contained in:
@@ -68,6 +68,9 @@ allprojects {
|
||||
compileOnly("com.ticxo.modelengine:api:R3.0.1")
|
||||
compileOnly("com.github.oraxen:oraxen:-SNAPSHOT")
|
||||
compileOnly("com.github.LoneDev6:API-ItemsAdder:3.2.5")
|
||||
compileOnly("com.mineinabyss:idofront:0.12.111")
|
||||
compileOnly("com.mineinabyss:geary-papermc-core:0.19.113")
|
||||
compileOnly("com.mineinabyss:looty:0.8.67")
|
||||
compileOnly("com.sk89q.worldguard:worldguard-bukkit:7.1.0-SNAPSHOT")
|
||||
compileOnly("it.unimi.dsi:fastutil:8.5.11")
|
||||
|
||||
@@ -227,4 +230,4 @@ bukkit {
|
||||
java {
|
||||
toolchain.languageVersion.set(JavaLanguageVersion.of(17
|
||||
))
|
||||
}
|
||||
}
|
||||
|
||||
@@ -12,6 +12,8 @@ dependencies {
|
||||
compileOnly("com.ticxo.modelengine:api:R3.0.1")
|
||||
compileOnly("com.github.oraxen:oraxen:-SNAPSHOT")
|
||||
compileOnly("com.github.LoneDev6:API-ItemsAdder:3.2.5")
|
||||
compileOnly("com.mineinabyss:geary-papermc-core:0.19.113")
|
||||
compileOnly("com.mineinabyss:looty:0.8.67")
|
||||
compileOnly("com.hibiscus:hmccolor:0.3-SNAPSHOT")
|
||||
compileOnly("com.sk89q.worldguard:worldguard-bukkit:7.1.0-SNAPSHOT")
|
||||
compileOnly("it.unimi.dsi:fastutil:8.5.11")
|
||||
|
||||
@@ -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