NekoX is a fun Minecraft plugin that makes Minecraft more interesting! It allows players to become cute neko girls with special abilities and interactive features.
Simply put: This plugin adds cute neko characters to your server!
NekoX-5.2-ProMax+++.jar fileplugins folder/nekoset playername true to turn a player into a nekoSimply put: Leather armor makes nekos run faster!
Simply put: Neko attacks are more powerful and can knock enemies further!
Simply put: Nekos are immune to falling but more vulnerable to attacks!
Simply put: Creepers and phantoms are afraid of nekos and will automatically avoid them!
/playernotice commandSimply put: Nekos receive notifications about nearby players!
/climb command to toggle climbing featureSimply put: Nekos can climb walls like spiders!
/pullthetail command to toggle tail pull featureSimply put: Players can interact with nekos by pulling their tails!
/health command to restore health for themselves and their ownersSimply put: Nekos can heal themselves and their owners with this skill!
/myskills - Shows all available skills for nekosSimply put: Nekos can view all their skills and cooldowns with this command!
/nekox placeholders - Lists all available NekoX placeholdersSimply put: More reliable placeholder system with improved user experience!
Simply put: More stable commands with correct message display!
Simply put: Enhanced language support with more reliable message handling!
Catnip is a special feature in the NekoX plugin that allows neko players to use specific items to gain temporary buff effects.
Basic Operation:
Specific Steps:
/nekoset yourname true to set)Catnip provides the following buff effects:
Effect Characteristics:
Customize catnip settings in config.yml:
cat-nip:
enabled: true # Enable/disable catnip feature
item: "WHEAT_SEEDS" # Catnip item ID (can be changed to other items)
duration: 60 # Effect duration (seconds)
Modifiable Item Options:
WHEAT_SEEDS (wheat seeds)GRASS (grass), FERN (fern), VINE (vine), etc.Important Note: Right-clicking with catnip in main hand consumes 1 catnip item, off-hand items won't trigger the effect.
/pat player - Gently pat someone/lovebite player - Give a cute love bite/earscratch player - Scratch someone's ears/purr - Make purring sounds/hiss player - Hiss at someone/scratch player - Scratch someone with claws/attention player - Attract other players' attention/pullthetail - Toggle tail pull feature/nightvision - Enable night vision/jumpboost - Jump boost/swiftsneak - Sneak speed/health - Heal yourself and owner/myskills - View all skills and cooldowns/playernotice [on|off] - Enable/disable player proximity notification/climb - Toggle climbing feature/owner add player - Request to become someone's owner/owner accept player - Accept owner request/owner deny player - Deny owner request/owner remove player - Remove owner relationship/owner list - View your owners/owner mylist - View your nekos/nekox reload - Reload plugin settings/nekoset player true/false - Set player as neko/nekox language language - Switch plugin language/nekox placeholders - Display all available NekoX placeholders/nekox placeholders - Lists all available NekoX placeholdersSimple Description: More reliable placeholder system with improved user experience!
Simple Description: More stable commands with correct message display!
Simple Description: Enhanced language support with more reliable message handling!
The plugin creates a config.yml file on first run, which you can open and modify with a text editor:
neko-chat: Enable/disable neko chat effectsmeat-only: Whether nekos can only eat meatowner-system: Enable/disable owner systemclaws: Claw attack damage and cooldown timearmor-bonus: Speed bonus from leather armornight-effects: Night ability start and end timeshealth-skill: Healing skill cooldown and costcat-nip: Catnip effects and durationstress-effect: Stress response trigger conditionspassive-attack-boost: Attack damage bonusarmor-bonus: Leather armor bonus settings
enabled: Enable/disable armor bonusleather-bonus: Leather armor type listspeed-bonus-per-piece: Speed bonus per armor pieceneko-damage-modification: Neko damage adjustment settings
enabled: Enable/disable damage adjustment featurefall-damage-immunity: Fall damage immunityother-damage-multiplier: Other damage increase multiplierdebug: Debug modeneko-mob-behavior: Neko mob behavior settings
enabled: Enable/disable mob behavior featurecreeper-repulsion: Creeper repulsion featurephantom-repulsion: Phantom repulsion featuredebug: Debug modemob-targeting: Mob targeting behavior settings
enabled: Enable/disable targeting behavior adjustmentdistance-increase: Detection distance increase multiplierfriendly-attraction: Enable/disable friendly mob attractionowner-death: Owner death effect settings
feature.enabled: Enable/disable owner death effectkeep-inventory: Keep neko inventorykeep-level: Keep neko experience levelNekoX provides a comprehensive API for other plugins to integrate neko functionality.
Using NekoX API in your plugin:
plugin.yml:depend: [NekoX]
import org.cneko.nekox.api.NekoXAPI;
public class YourPlugin extends JavaPlugin {
private NekoXAPI nekoXAPI;
@Override
public void onEnable() {
nekoXAPI = NekoXAPI.getInstance(this);
if (nekoXAPI == null) {
getLogger().warning("NekoX plugin not found!");
getServer().getPluginManager().disablePlugin(this);
return;
}
}
}
Since NekoX is not published to JitPack or other public repositories, you need to manually add it to your project:
Maven Project Setup:
libs folder in your project directoryNekoX-5.2-ProMax+++.jar file from this plugin's target folder to your libs folderpom.xml:<dependency>
<groupId>org.cneko</groupId>
<artifactId>NekoX</artifactId>
<version>5.2-ProMax+++</version>
<scope>system</scope>
<systemPath>${project.basedir}/libs/NekoX-5.2-ProMax+++.jar</systemPath>
</dependency>
Gradle Project Setup:
libs folder in your project directoryNekoX-5.2-ProMax+++.jar file to your libs folderbuild.gradle:implementation files('libs/NekoX-5.2-ProMax+++.jar')
Manual Setup (IDE):
libs folder in your project directoryNekoX-5.2-ProMax+++.jar file to your libs folderboolean isNeko(Player player) - Check if player is a nekoboolean isNeko(String playerName) - Check if player (by name) is a nekoSet<String> getAllNekoNames() - Get all neko player names (including offline)Set<String> getOwnerNames(String nekoName) - Get all owners of a nekoboolean isOwnerOf(String ownerName, String nekoName) - Check if player is owner of a nekoboolean hasOwner(String playerName) - Check if player has an ownerNekoX provides custom events for other plugins to listen to:
Triggered when a player's neko status changes:
@EventHandler
public void onNekoStatusChange(NekoStatusChangeEvent event) {
Player player = event.getPlayer();
boolean isNeko = event.isNeko();
boolean isOnline = event.isOnline();
// Handle status change
}
Triggered when owner relationships are added, removed, or requested:
@EventHandler
public void onOwnerRelationshipChange(OwnerRelationshipEvent event) {
String nekoName = event.getNekoName();
String ownerName = event.getOwnerName();
OwnerRelationshipEvent.RelationshipAction action = event.getAction();
switch (action) {
case ADD:
// Handle relationship addition
break;
case REMOVE:
// Handle relationship removal
break;
case REQUEST:
// Handle relationship request
break;
}
}
💡 Friendly Reminder: If you're just a regular user without programming knowledge, you can skip this section!
If you want to develop plugins that integrate with NekoX, here's the Maven configuration you need:
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0
http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>your.group.id</groupId>
<artifactId>YourPlugin</artifactId>
<version>1.0-SNAPSHOT</version>
<packaging>jar</packaging>
<name>YourPlugin</name>
<properties>
<java.version>17</java.version>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
</properties>
<repositories>
<!-- PaperMC Repository -->
<repository>
<id>papermc-repo</id>
<url>https://repo.papermc.io/repository/maven-public/</url>
</repository>
</repositories>
<dependencies>
<!-- Paper API -->
<dependency>
<groupId>io.papermc.paper</groupId>
<artifactId>paper-api</artifactId>
<version>1.20.4-R0.1-SNAPSHOT</version>
<scope>provided</scope>
</dependency>
<!-- NekoX API -->
<!-- Place the NekoX plugin jar file in your project's libs folder -->
<dependency>
<groupId>org.cneko</groupId>
<artifactId>NekoX</artifactId>
<version>5.2-ProMax+++</version>
<scope>system</scope>
<systemPath>${project.basedir}/libs/NekoX-5.2-ProMax+++.jar</systemPath>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.11.0</version>
<configuration>
<source>${java.version}</source>
<target>${java.version}</target>
</configuration>
</plugin>
</plugins>
</build>
</project>
If you want to compile the plugin file yourself, you can follow these steps:
Open command line and enter:
mvn clean install
Important Note: You need to install Java 21 on your computer first Open command line and enter:
mvn clean install -Ppaper-1.21.4
NekoX integrates with PlaceholderAPI and provides the following placeholders (requires PlaceholderAPI plugin to be installed):
| Placeholder | Description |
|---|---|
%nekox_is_neko% | Check if player is a neko |
%nekox_humans% | Get list of non-neko players |
%nekox_nekos% | Get list of neko players |
Use the /nekox placeholders command to view all available placeholders and their status.
EntityDamageEvent eventsFALL enum), cancel the damage eventExplosionPrimeEvent, cancel explosion and apply reverse thrustEntityTargetLivingEntityEvent, cancel attack and apply reverse thrustA: Supports 1.20.4 and 1.21.4 versions
A: Admin types /nekoset playername true
A: Night vision, jump boost, sneak speed, special chat, claw attacks, etc.
A: Nekos can have owners, owners and nekos can heal each other and have special interactions
A: Edit the plugins/NekoX/config.yml file
A: Yes! Type /nekox language chinese to switch to Chinese
If you encounter problems:
NekoX is a feature-rich Minecraft neko plugin that adds neko characters and related functionality to servers. This developer Wiki aims to help other plugin developers understand how to integrate with the NekoX plugin.
If you use Maven to build your plugin, add the following configuration to your pom.xml file:
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0
http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>your.group.id</groupId>
<artifactId>YourPlugin</artifactId>
<version>1.0-SNAPSHOT</version>
<packaging>jar</packaging>
<name>YourPlugin</name>
<properties>
<java.version>17</java.version>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
</properties>
<repositories>
<!-- PaperMC Repository -->
<repository>
<id>papermc-repo</id>
<url>https://repo.papermc.io/repository/maven-public/</url>
</repository>
</repositories>
<dependencies>
<!-- Paper API -->
<dependency>
<groupId>io.papermc.paper</groupId>
<artifactId>paper-api</artifactId>
<version>1.20.4-R0.1-SNAPSHOT</version>
<scope>provided</scope>
</dependency>
<!-- NekoX API -->
<!-- Place the NekoX plugin jar file in your project's libs folder -->
<dependency>
<groupId>org.cneko</groupId>
<artifactId>NekoX</artifactId>
<version>5.2-ProMax+++</version>
<scope>system</scope>
<systemPath>${project.basedir}/libs/NekoX-5.2-ProMax+++.jar</systemPath>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.11.0</version>
<configuration>
<source>${java.version}</source>
<target>${java.version}</target>
</configuration>
</plugin>
</plugins>
</build>
</project>
If you use Gradle to build your plugin, add the following configuration to your build.gradle file:
plugins {
id 'java'
}
group = 'your.group.id'
version = '1.0-SNAPSHOT'
repositories {
// PaperMC Repository
maven {
name = 'papermc'
url = 'https://repo.papermc.io/repository/maven-public/'
}
mavenCentral()
}
dependencies {
// Paper API
compileOnly 'io.papermc.paper:paper-api:1.20.4-R0.1-SNAPSHOT'
// NekoX API
// Place the NekoX plugin jar file in your project's libs folder
implementation files('libs/NekoX-5.2-ProMax+++.jar')
}
java {
toolchain {
languageVersion = JavaLanguageVersion.of(17)
}
}
tasks.withType(JavaCompile) {
options.encoding = 'UTF-8'
}
If you don't use build tools, you can directly add the NekoX plugin jar file to your project dependencies:
After building your plugin, ensure:
NekoX supports multiple Minecraft versions:
If you need to build a specific version, you can use Maven profiles:
# Build 1.20.4 version (default)
mvn clean install
# Build 1.21.4 version
mvn clean install -Ppaper-1.21.4
To use the NekoX API in your plugin, first you need to get the API instance:
import org.cneko.nekox.api.NekoXAPI;
// In your plugin main class
public class YourPlugin extends JavaPlugin {
private NekoXAPI nekoXAPI;
@Override
public void onEnable() {
// Get NekoX API instance
nekoXAPI = NekoXAPI.getInstance(this);
if (nekoXAPI == null) {
getLogger().warning("NekoX plugin not found, please ensure NekoX is installed and enabled!");
getServer().getPluginManager().disablePlugin(this);
return;
}
getLogger().info("Successfully connected to NekoX API!");
}
}
Add NekoX as a dependency in your plugin.yml file:
name: YourPlugin
version: 1.0
main: your.package.YourPlugin
api-version: 1.13
depend: [NekoX]
boolean isNeko(Player player)Check if specified player is a neko
Parameters:
player: Player to checkReturn Value:
true: Player is a nekofalse: Player is not a nekoboolean isNeko(String playerName)Check if specified player name is a neko (supports offline players)
Parameters:
playerName: Player nameReturn Value:
true: Player is a nekofalse: Player is not a nekoSet<String> getAllNekoNames()Get all neko player names (including offline)
Return Value:
Set<String> getOwnerNames(String nekoName)Get all owner names of specified neko
Parameters:
nekoName: Neko player nameReturn Value:
boolean isOwnerOf(String ownerName, String nekoName)Check if specified player is owner of a neko
Parameters:
ownerName: Owner player namenekoName: Neko player nameReturn Value:
true: Is ownerfalse: Is not ownerboolean hasOwner(String playerName)Check if specified player has an owner
Parameters:
playerName: Player nameReturn Value:
true: Has ownerfalse: Has no ownerPlayer player = ...; // Get player instance
if (nekoXAPI.isNeko(player)) {
player.sendMessage("You are a cute neko!");
} else {
player.sendMessage("You are not a neko~");
}
Set<String> nekoNames = nekoXAPI.getAllNekoNames();
for (String nekoName : nekoNames) {
// Process each neko player name
getLogger().info("Neko: " + nekoName);
}
String ownerName = ...; // Owner player name
String nekoName = ...; // Neko player name
if (nekoXAPI.isOwnerOf(ownerName, nekoName)) {
getLogger().info(ownerName + " is the owner of " + nekoName + "!");
}
String nekoName = ...; // Neko player name
Set<String> owners = nekoXAPI.getOwnerNames(nekoName);
if (owners.isEmpty()) {
getLogger().info(nekoName + " doesn't have an owner yet~");
} else {
StringBuilder message = new StringBuilder(nekoName + "'s owners: ");
for (String owner : owners) {
message.append(owner).append(", ");
}
getLogger().info(message.toString());
}
NekoX provides some custom events that other plugins can listen to in order to respond to neko-related behaviors.
Triggered when a player's neko status changes
Event Class: org.cneko.nekox.api.events.NekoStatusChangeEvent
Trigger Timing: When a player is set as neko or neko status is cancelled
Usage Example:
@EventHandler
public void onNekoStatusChange(NekoStatusChangeEvent event) {
Player player = event.getPlayer();
boolean isNeko = event.isNeko();
boolean isOnline = event.isOnline();
if (isNeko) {
getLogger().info(player.getName() + " became a neko!");
} else {
getLogger().info(player.getName() + " is no longer a neko!");
}
}
Triggered when owner relationship changes
Event Class: org.cneko.nekox.api.events.OwnerRelationshipEvent
Trigger Timing: When adding, removing, or requesting owner relationship
Usage Example:
@EventHandler
public void onOwnerRelationshipChange(OwnerRelationshipEvent event) {
String nekoName = event.getNekoName();
String ownerName = event.getOwnerName();
OwnerRelationshipEvent.RelationshipAction action = event.getAction();
switch (action) {
case ADD:
getLogger().info(ownerName + " became the owner of " + nekoName + "!");
break;
case REMOVE:
getLogger().info(ownerName + " is no longer the owner of " + nekoName + "!");
break;
case REQUEST:
getLogger().info(ownerName + " requested to become the owner of " + nekoName + "!");
break;
}
}
NekoX uses SQLite database to store player data, including:
Store player basic configuration
player_name: Player name (primary key)notice_enabled: Whether player proximity notification is enabledis_neko: Whether is a nekotail_pull_enabled: Whether tail pull feature is enabledStore neko-owner relationships
neko_name: Neko nameowner_name: Owner nameStore owner request relationships
requester_name: Requester nameneko_name: Requested neko nameIf you encounter problems or have improvement suggestions while using the NekoX API, please contact us through the following methods:
Thank you for using NekoX!
NekoX是一个让Minecraft变得更有趣的插件!它可以让玩家变成可爱的猫娘,拥有特殊能力和互动方式。
简单来说: 这个插件让你的服务器里出现可爱的猫娘角色!
NekoX-5.2-ProMax+++.jar 文件plugins 文件夹里/nekoset 玩家名字 true 把玩家变成猫娘简单来说: 皮革护甲让猫娘跑得更快!
简单来说: 猫娘的攻击更有力,能把敌人打得更远!
简单来说: 猫娘不怕摔,但更容易受伤!
简单来说: 苦力怕和幻翼都怕猫娘,会自动躲开!
/playernotice命令开启/关闭功能简单来说: 猫娘会在动作栏中实时收到附近玩家的通知!
/climb命令开启/关闭爬墙功能简单来说: 猫娘可以像蜘蛛一样在墙壁上爬行!
/pullthetail命令开启/关闭尾巴拉扯功能简单来说: 玩家可以和猫娘进行尾巴拉扯的互动!
/health命令恢复自己和主人的生命值简单来说: 猫娘可以用这个技能治疗自己和主人!
/myskills - 显示猫娘可用的所有技能简单来说: 猫娘可以通过这个命令查看所有技能和冷却时间!
/nekox placeholders - 列出所有可用的NekoX占位符简单来说: 更可靠的占位符系统,提升用户体验!
简单来说: 更稳定的命令,消息显示正确!
简单来说: 增强的语言支持,消息处理更可靠!
猫薄荷是NekoX插件中的一个特殊功能,让猫娘玩家使用特定物品获得临时增益效果。
基本操作:
具体步骤:
/nekoset 你的名字 true 设置)猫薄荷提供以下增益效果:
效果特点:
在 config.yml 中可以自定义猫薄荷设置:
cat-nip:
enabled: true # 是否启用猫薄荷功能
item: "WHEAT_SEEDS" # 猫薄荷物品ID(可修改为其他物品)
duration: 60 # 效果持续时间(秒)
可修改的物品选项:
WHEAT_SEEDS(小麦种子)GRASS(草)、FERN(蕨类)、VINE(藤蔓)等重要提示: 主手持物右键会消耗1个猫薄荷物品,副手持物不会触发效果。
/pat 玩家 - 轻轻拍拍别人/lovebite 玩家 - 给个可爱的咬咬/earscratch 玩家 - 挠挠耳朵/purr - 发出呼噜声/hiss 玩家 - 对别人发出嘶嘶声/scratch 玩家 - 用爪子抓一下/attention 玩家 - 吸引其他玩家的注意/pullthetail - 开关尾巴拉扯功能/nightvision - 开启夜视/jumpboost - 跳跃增强/swiftsneak - 潜行加速/health - 治疗自己和主人/myskills - 查看所有技能和冷却时间/playernotice [on|off] - 开启/关闭玩家接近提醒/climb - 开关爬墙功能/owner add 玩家 - 请求成为某人的主人/owner accept 玩家 - 接受主人的请求/owner deny 玩家 - 拒绝主人的请求/owner remove 玩家 - 解除主人关系/owner list - 查看自己的主人/owner mylist - 查看自己的猫娘/nekox reload - 重新加载插件设置/nekoset 玩家 true/false - 设置玩家为猫娘/nekox language 语言 - 切换插件语言/nekox placeholders - 显示所有可用的NekoX占位符插件第一次运行时会创建 config.yml 文件,你可以用记事本打开修改:
neko-chat: 开启/关闭猫娘聊天特效meat-only: 猫娘是否只能吃肉owner-system: 是否开启主人系统claws: 爪子攻击的伤害和冷却时间armor-bonus: 皮革护甲提供的速度加成night-effects: 夜间能力的开始和结束时间health-skill: 治疗技能的冷却和消耗cat-nip: 猫薄荷的效果和持续时间stress-effect: 应激反应的触发条件passive-attack-boost: 攻击伤害加成armor-bonus: 皮革护甲加成设置
enabled: 是否启用护甲加成leather-bonus: 皮革护甲类型列表speed-bonus-per-piece: 每件护甲的速度加成neko-damage-modification: 猫娘伤害调整设置
enabled: 是否启用伤害调整功能fall-damage-immunity: 免疫跌落伤害other-damage-multiplier: 其他伤害增加倍数debug: 调试模式neko-mob-behavior: 猫娘生物行为设置
enabled: 是否启用生物行为功能creeper-repulsion: 苦力怕驱赶功能phantom-repulsion: 幻翼驱赶功能debug: 调试模式mob-targeting: 生物目标行为设置
enabled: 是否启用目标行为调整distance-increase: 检测距离增加倍数friendly-attraction: 是否启用友好生物吸引owner-death: 主人死亡效应设置
feature.enabled: 是否启用主人死亡效应keep-inventory: 是否保留猫娘物品栏keep-level: 是否保留猫娘经验等级NekoX为其他插件提供了全面的API,以便集成猫娘功能。
在您的插件中使用NekoX API:
plugin.yml 中添加依赖:depend: [NekoX]
import org.cneko.nekox.api.NekoXAPI;
public class YourPlugin extends JavaPlugin {
private NekoXAPI nekoXAPI;
@Override
public void onEnable() {
nekoXAPI = NekoXAPI.getInstance(this);
if (nekoXAPI == null) {
getLogger().warning("未找到NekoX插件!");
getServer().getPluginManager().disablePlugin(this);
return;
}
}
}
由于NekoX没有发布到JitPack或其他公共仓库,您需要手动将其添加到您的项目中:
Maven项目设置:
libs 文件夹NekoX-5.2-ProMax+++.jar 文件复制到您的 libs 文件夹pom.xml 中添加以下依赖:<dependency>
<groupId>org.cneko</groupId>
<artifactId>NekoX</artifactId>
<version>5.2-ProMax+++</version>
<scope>system</scope>
<systemPath>${project.basedir}/libs/NekoX-5.2-ProMax+++.jar</systemPath>
</dependency>
Gradle项目设置:
libs 文件夹NekoX-5.2-ProMax+++.jar 文件复制到您的 libs 文件夹build.gradle 中添加以下依赖:implementation files('libs/NekoX-5.2-ProMax+++.jar')
手动设置(IDE):
libs 文件夹NekoX-5.2-ProMax+++.jar 文件复制到您的 libs 文件夹boolean isNeko(Player player) - 检查玩家是否为猫娘boolean isNeko(String playerName) - 检查玩家(按名称)是否为猫娘Set<String> getAllNekoNames() - 获取所有猫娘玩家名称(包括离线)Set<String> getOwnerNames(String nekoName) - 获取猫娘的所有主人名称boolean isOwnerOf(String ownerName, String nekoName) - 检查玩家是否为猫娘的主人boolean hasOwner(String playerName) - 检查玩家是否有主人NekoX提供了自定义事件供其他插件监听:
当玩家的猫娘状态改变时触发:
@EventHandler
public void onNekoStatusChange(NekoStatusChangeEvent event) {
Player player = event.getPlayer();
boolean isNeko = event.isNeko();
boolean isOnline = event.isOnline();
// 处理状态变更
}
当主人关系添加、移除或申请时触发:
@EventHandler
public void onOwnerRelationshipChange(OwnerRelationshipEvent event) {
String nekoName = event.getNekoName();
String ownerName = event.getOwnerName();
OwnerRelationshipEvent.RelationshipAction action = event.getAction();
switch (action) {
case ADD:
// 处理关系添加
break;
case REMOVE:
// 处理关系移除
break;
case REQUEST:
// 处理关系申请
break;
}
}
💡 温馨提示:如果您只是普通用户,没有编程基础,可以跳过这部分内容!
如果您想开发与NekoX集成的插件,以下是您需要的Maven配置:
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0
http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>your.group.id</groupId>
<artifactId>YourPlugin</artifactId>
<version>1.0-SNAPSHOT</version>
<packaging>jar</packaging>
<name>YourPlugin</name>
<properties>
<java.version>17</java.version>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
</properties>
<repositories>
<!-- PaperMC仓库 -->
<repository>
<id>papermc-repo</id>
<url>https://repo.papermc.io/repository/maven-public/</url>
</repository>
</repositories>
<dependencies>
<!-- Paper API -->
<dependency>
<groupId>io.papermc.paper</groupId>
<artifactId>paper-api</artifactId>
<version>1.20.4-R0.1-SNAPSHOT</version>
<scope>provided</scope>
</dependency>
<!-- NekoX API -->
<!-- 将NekoX插件jar文件放在项目的libs文件夹中 -->
<dependency>
<groupId>org.cneko</groupId>
<artifactId>NekoX</artifactId>
<version>5.2-ProMax+++</version>
<scope>system</scope>
<systemPath>${project.basedir}/libs/NekoX-5.2-ProMax+++.jar</systemPath>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.11.0</version>
<configuration>
<source>${java.version}</source>
<target>${java.version}</target>
</configuration>
</plugin>
</plugins>
</build>
</project>
如果您想要自己编译插件文件,可以按照以下步骤操作:
打开命令行,输入:
mvn clean install
重要提示:您需要先在电脑上安装 Java 21 打开命令行,输入:
mvn clean install -Ppaper-1.21.4