diff --git a/build.gradle.kts b/build.gradle.kts index c51a5d41..d7c5cbdc 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -27,6 +27,8 @@ repositories { maven("https://repo.auxilor.io/repository/maven-public/") //NBT-API maven("https://repo.codemc.io/repository/maven-public/") + //Nexo + maven("https://repo.nexomc.com/releases") mavenCentral() } @@ -39,7 +41,7 @@ dependencies { compileOnly("com.github.MilkBowl:VaultAPI:1.7") compileOnly("org.black_ixx:playerpoints:3.2.5") compileOnly("net.luckperms:api:5.4") - compileOnly("me.clip:placeholderapi:2.11.1") + compileOnly("me.clip:placeholderapi:2.11.6") compileOnly("com.github.LoneDev6:API-ItemsAdder:3.6.3-beta-14") compileOnly("com.github.oraxen:oraxen:1.160.0") compileOnly("io.lumine:Mythic-Dist:5.3.5") @@ -50,6 +52,7 @@ dependencies { compileOnly("com.willfp:eco:6.74.2") compileOnly("com.willfp:libreforge:4.71.6:all@jar") compileOnly("com.ssomar:SCore:5.24.10.5") + compileOnly("com.nexomc:nexo:0.7.0") implementation("com.crypticlib:bukkit:${rootProject.findProperty("crypticlibVer")}") implementation("com.crypticlib:bukkit-ui:${rootProject.findProperty("crypticlibVer")}") implementation("com.crypticlib:bukkit-conversation:${rootProject.findProperty("crypticlibVer")}") diff --git a/src/main/java/com/github/yufiriamazenta/craftorithm/hook/impl/NexoHooker.java b/src/main/java/com/github/yufiriamazenta/craftorithm/hook/impl/NexoHooker.java new file mode 100644 index 00000000..f1196c40 --- /dev/null +++ b/src/main/java/com/github/yufiriamazenta/craftorithm/hook/impl/NexoHooker.java @@ -0,0 +1,30 @@ +package com.github.yufiriamazenta.craftorithm.hook.impl; + +import com.github.yufiriamazenta.craftorithm.hook.ItemPluginHooker; +import com.github.yufiriamazenta.craftorithm.item.ItemProvider; +import com.github.yufiriamazenta.craftorithm.item.impl.NexoItemProvider; +import crypticlib.lifecycle.AutoTask; +import crypticlib.lifecycle.LifeCycle; +import crypticlib.lifecycle.TaskRule; + +@AutoTask(rules = @TaskRule(lifeCycle = LifeCycle.ACTIVE)) +public enum NexoHooker implements ItemPluginHooker { + + INSTANCE; + + @Override + public ItemProvider itemProvider() { + return NexoItemProvider.INSTANCE; + } + + @Override + public String pluginName() { + return "Nexo"; + } + + @Override + public boolean hook() { + return hookByEnabled(); + } + +} diff --git a/src/main/java/com/github/yufiriamazenta/craftorithm/item/impl/NexoItemProvider.java b/src/main/java/com/github/yufiriamazenta/craftorithm/item/impl/NexoItemProvider.java new file mode 100644 index 00000000..8936bd5c --- /dev/null +++ b/src/main/java/com/github/yufiriamazenta/craftorithm/item/impl/NexoItemProvider.java @@ -0,0 +1,31 @@ +package com.github.yufiriamazenta.craftorithm.item.impl; + +import com.github.yufiriamazenta.craftorithm.item.ItemProvider; +import org.bukkit.OfflinePlayer; +import org.bukkit.inventory.ItemStack; + +public enum NexoItemProvider implements ItemProvider { + + INSTANCE; + + @Override + public String namespace() { + return "nexo"; + } + + @Override + public String getItemName(ItemStack itemStack, boolean ignoreAmount) { + return ""; + } + + @Override + public ItemStack getItem(String itemName) { + return null; + } + + @Override + public ItemStack getItem(String itemName, OfflinePlayer player) { + return null; + } + +}