Skip to content

Commit

Permalink
准备挂钩Nexo
Browse files Browse the repository at this point in the history
  • Loading branch information
YufiriaMazenta committed Jan 7, 2025
1 parent 70e7bff commit 7ebb3e1
Show file tree
Hide file tree
Showing 3 changed files with 65 additions and 1 deletion.
5 changes: 4 additions & 1 deletion build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -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()
}

Expand All @@ -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")
Expand All @@ -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")}")
Expand Down
Original file line number Diff line number Diff line change
@@ -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();
}

}
Original file line number Diff line number Diff line change
@@ -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;
}

}

0 comments on commit 7ebb3e1

Please sign in to comment.