mirror of
https://github.com/HibiscusMC/HMCCosmetics.git
synced 2025-12-19 15:09:19 +00:00
update geary hook
This commit is contained in:
@@ -27,6 +27,7 @@ allprojects {
|
|||||||
// ProtocolLib repo
|
// ProtocolLib repo
|
||||||
maven("https://repo.dmulloy2.net/repository/public/") //ProtocolLib Repo, constantly down
|
maven("https://repo.dmulloy2.net/repository/public/") //ProtocolLib Repo, constantly down
|
||||||
maven("https://repo.mineinabyss.com/releases/")
|
maven("https://repo.mineinabyss.com/releases/")
|
||||||
|
maven("https://repo.mineinabyss.com/snapshots/")
|
||||||
|
|
||||||
// PlaceholderAPI
|
// PlaceholderAPI
|
||||||
maven("https://repo.extendedclip.com/content/repositories/placeholderapi/")
|
maven("https://repo.extendedclip.com/content/repositories/placeholderapi/")
|
||||||
@@ -71,12 +72,10 @@ allprojects {
|
|||||||
compileOnly("org.jetbrains:annotations:23.0.0")
|
compileOnly("org.jetbrains:annotations:23.0.0")
|
||||||
compileOnly("com.comphenix.protocol:ProtocolLib:5.0.0")
|
compileOnly("com.comphenix.protocol:ProtocolLib:5.0.0")
|
||||||
compileOnly("me.clip:placeholderapi:2.11.1")
|
compileOnly("me.clip:placeholderapi:2.11.1")
|
||||||
compileOnly("com.ticxo.modelengine:api:R3.0.1")
|
compileOnly("com.ticxo:modelengine:R3.0.1")
|
||||||
compileOnly("com.github.oraxen:oraxen:-SNAPSHOT")
|
compileOnly("com.github.oraxen:oraxen:-SNAPSHOT")
|
||||||
compileOnly("com.github.LoneDev6:API-ItemsAdder:3.2.5")
|
compileOnly("com.github.LoneDev6:API-ItemsAdder:3.2.5")
|
||||||
compileOnly("com.mineinabyss:idofront:0.12.111")
|
compileOnly("com.mineinabyss:geary-papermc:0.24-SNAPSHOT")
|
||||||
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("com.sk89q.worldguard:worldguard-bukkit:7.1.0-SNAPSHOT")
|
||||||
compileOnly("it.unimi.dsi:fastutil:8.5.11")
|
compileOnly("it.unimi.dsi:fastutil:8.5.11")
|
||||||
compileOnly("com.github.LeonMangler:SuperVanish:6.2.6-4")
|
compileOnly("com.github.LeonMangler:SuperVanish:6.2.6-4")
|
||||||
@@ -169,7 +168,7 @@ bukkit {
|
|||||||
apiVersion = "1.17"
|
apiVersion = "1.17"
|
||||||
authors = listOf("LoJoSho")
|
authors = listOf("LoJoSho")
|
||||||
depend = listOf("ProtocolLib")
|
depend = listOf("ProtocolLib")
|
||||||
softDepend = listOf("ModelEngine", "Oraxen", "ItemsAdder", "Looty", "HMCColor", "WorldGuard", "MythicMobs", "PlaceholderAPI", "SuperVanish", "PremiumVanish", "LibsDisguises", "Denizen")
|
softDepend = listOf("ModelEngine", "Oraxen", "ItemsAdder", "Geary", "HMCColor", "WorldGuard", "MythicMobs", "PlaceholderAPI", "SuperVanish", "PremiumVanish", "LibsDisguises", "Denizen")
|
||||||
version = "${project.version}"
|
version = "${project.version}"
|
||||||
|
|
||||||
commands {
|
commands {
|
||||||
@@ -256,4 +255,4 @@ bukkit {
|
|||||||
java {
|
java {
|
||||||
toolchain.languageVersion.set(JavaLanguageVersion.of(17
|
toolchain.languageVersion.set(JavaLanguageVersion.of(17
|
||||||
))
|
))
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -9,11 +9,10 @@ dependencies {
|
|||||||
compileOnly("org.jetbrains:annotations:23.0.0")
|
compileOnly("org.jetbrains:annotations:23.0.0")
|
||||||
compileOnly("com.comphenix.protocol:ProtocolLib:5.0.0")
|
compileOnly("com.comphenix.protocol:ProtocolLib:5.0.0")
|
||||||
compileOnly("me.clip:placeholderapi:2.11.1")
|
compileOnly("me.clip:placeholderapi:2.11.1")
|
||||||
compileOnly("com.ticxo.modelengine:api:R3.0.1")
|
compileOnly("com.ticxo:modelengine:R3.0.1")
|
||||||
compileOnly("com.github.oraxen:oraxen:-SNAPSHOT")
|
compileOnly("com.github.oraxen:oraxen:-SNAPSHOT")
|
||||||
compileOnly("com.github.LoneDev6:API-ItemsAdder:3.2.5")
|
compileOnly("com.github.LoneDev6:API-ItemsAdder:3.2.5")
|
||||||
compileOnly("com.mineinabyss:geary-papermc-core:0.19.113")
|
compileOnly("com.mineinabyss:geary-papermc:0.24-SNAPSHOT")
|
||||||
compileOnly("com.mineinabyss:looty:0.8.67")
|
|
||||||
compileOnly("com.hibiscus:hmccolor:0.3-SNAPSHOT")
|
compileOnly("com.hibiscus:hmccolor:0.3-SNAPSHOT")
|
||||||
compileOnly("com.sk89q.worldguard:worldguard-bukkit:7.1.0-SNAPSHOT")
|
compileOnly("com.sk89q.worldguard:worldguard-bukkit:7.1.0-SNAPSHOT")
|
||||||
compileOnly("it.unimi.dsi:fastutil:8.5.11")
|
compileOnly("it.unimi.dsi:fastutil:8.5.11")
|
||||||
|
|||||||
@@ -17,7 +17,7 @@ public class Hooks {
|
|||||||
private static final HashMap<String, Hook> hooks = new HashMap<>();
|
private static final HashMap<String, Hook> hooks = new HashMap<>();
|
||||||
private static HookOraxen ORAXEN_HOOK = new HookOraxen();
|
private static HookOraxen ORAXEN_HOOK = new HookOraxen();
|
||||||
private static HookItemAdder ITEMADDER_HOOK = new HookItemAdder();
|
private static HookItemAdder ITEMADDER_HOOK = new HookItemAdder();
|
||||||
private static HookLooty LOOTY_HOOK = new HookLooty();
|
private static HookGeary GEARY_HOOK = new HookGeary();
|
||||||
private static HookMythic MYTHIC_HOOK = new HookMythic();
|
private static HookMythic MYTHIC_HOOK = new HookMythic();
|
||||||
private static HookDenizen DENIZEN_HOOK = new HookDenizen();
|
private static HookDenizen DENIZEN_HOOK = new HookDenizen();
|
||||||
private static HookHMCCosmetics HMCCOSMETIC_HOOK = new HookHMCCosmetics();
|
private static HookHMCCosmetics HMCCOSMETIC_HOOK = new HookHMCCosmetics();
|
||||||
|
|||||||
@@ -1,28 +1,28 @@
|
|||||||
package com.hibiscusmc.hmccosmetics.hooks.items;
|
package com.hibiscusmc.hmccosmetics.hooks.items;
|
||||||
|
|
||||||
import com.hibiscusmc.hmccosmetics.hooks.Hook;
|
import com.hibiscusmc.hmccosmetics.hooks.Hook;
|
||||||
|
import com.mineinabyss.geary.papermc.tracking.items.ItemTrackingKt;
|
||||||
import com.mineinabyss.geary.prefabs.PrefabKey;
|
import com.mineinabyss.geary.prefabs.PrefabKey;
|
||||||
import com.mineinabyss.looty.LootyFactory;
|
|
||||||
import org.bukkit.inventory.ItemStack;
|
import org.bukkit.inventory.ItemStack;
|
||||||
import org.jetbrains.annotations.NotNull;
|
import org.jetbrains.annotations.NotNull;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* A hook that integrates the plugin {@link com.mineinabyss.looty.LootyPlugin Looty} to provide custom items
|
* A hook that integrates the plugin {@link com.mineinabyss.geary.papermc.GearyPlugin Geary} to provide custom items
|
||||||
*/
|
*/
|
||||||
@SuppressWarnings("SpellCheckingInspection")
|
@SuppressWarnings("SpellCheckingInspection")
|
||||||
public class HookLooty extends Hook {
|
public class HookGeary extends Hook {
|
||||||
public HookLooty() {
|
public HookGeary() {
|
||||||
super("looty");
|
super("geary");
|
||||||
setEnabledItemHook(true);
|
setEnabledItemHook(true);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Gets a cosmetic {@link ItemStack} that is associated with the provided id from the plugin {@link com.mineinabyss.looty.LootyPlugin Looty}
|
* Gets a cosmetic {@link ItemStack} that is associated with the provided id from the plugin {@link com.mineinabyss.geary.papermc.GearyPlugin Geary}
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public ItemStack getItem(@NotNull String itemId) {
|
public ItemStack getItem(@NotNull String itemId) {
|
||||||
PrefabKey prefabKey = PrefabKey.Companion.ofOrNull(itemId);
|
PrefabKey prefabKey = PrefabKey.Companion.ofOrNull(itemId);
|
||||||
if (prefabKey == null) return null;
|
if (prefabKey == null) return null;
|
||||||
return LootyFactory.INSTANCE.createFromPrefab(prefabKey);
|
return ItemTrackingKt.getItemTracking().getProvider().serializePrefabToItemStack(prefabKey, null);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Reference in New Issue
Block a user