- 版权类型
- 转载
- 插件中文名
- DK NPC
- 插件英文名
- DK NPC
- 支持的核心 [服务端]
- Purpur
- 语言支持
- 中文(简体)
- 适配Minecraft版本 [Java]
- 1.21
[MD]
## 简介
使用 ServerPlayerEntity 实现真实感 NPC(与 Citizens 插件采用相同技术)
支持任意 Minecraft 玩家的自定义皮肤
点击 NPC 时触发的动作系统
NPC 头顶悬浮文字(全息文本)
简洁直观的命令体系
轻量级设计,针对服务器性能优化
# DK NPC
## 功能特性
- 使用 `ServerPlayerEntity` 实现真实感 NPC(与 Citizens 插件采用相同技术)
- 支持任意 Minecraft 玩家的自定义皮肤
- 点击 NPC 时触发的动作系统
- NPC 头顶悬浮文字(全息文本)
- 简洁直观的命令体系
- 轻量级设计,针对服务器性能优化
---
## 命令列表
所有命令需要权限等级 2(OP)。
### 基础管理
- `/npc create <name> <skinPlayer>` — 使用指定玩家的皮肤创建 NPC
- `/npc remove <name>` — 删除指定 NPC
- `/npc removeall` — 删除所有 NPC
- `/npc list` — 列出所有已激活的 NPC
- `/npc rename <name> <newName>` — 重命名 NPC
### 位置管理
- `/npc teleport <name> <x> <y> <z>` — 传送 NPC 至指定位置
- `/npc teleport <name> <x> <y> <z> <yaw> <pitch>` — 传送 NPC 并设置朝向角度
### 皮肤管理
- `/npc skin <name> <skinPlayer>` — 更换 NPC 皮肤
### 动作管理(点击 NPC 时触发)
- `/npc action <name> add <action>` — 添加动作
- `/npc action <name> remove <index>` — 删除指定动作
- `/npc action <name> list` — 列出所有动作
- `/npc action <name> clear` — 删除所有动作
### 悬浮文字管理
- `/npc lines <name> add <text>` — 添加一行文字
- `/npc lines <name> remove <index>` — 删除指定行
- `/npc lines <name> list` — 列出所有文字行
- `/npc lines <name> clear` — 删除所有文字行
---
## 动作类型
添加动作时支持以下格式:
- `MESSAGE: <text>` — 向玩家发送消息,支持 `&` 颜色代码
- `PLAYER: <command>` — 以玩家身份执行命令(相当于玩家在聊天栏输入)
- `CONSOLE: <command>` — 通过控制台执行命令
- `/<command>` — 执行服务器命令
在动作内容中使用 `%player%` 可自动替换为当前点击该 NPC 的玩家名。
---
## 使用示例
```
# Create an NPC with Notch skin
/npc create Vendor Notch
# Add lines of text
/npc lines Vendor add &6&lStore
/npc lines Vendor add &7Click to buy!
# Add actions when clicking
/npc action Vendor add MESSAGE: &aHello, %player%!
/npc action Vendor add CONSOLE: give %player% diamond 1
# Teleport the NPC
/npc teleport Vendor 100 64 200 90 0
# Change the skin
/npc skin Vendor jeb_
```
[/MD]
## 简介
使用 ServerPlayerEntity 实现真实感 NPC(与 Citizens 插件采用相同技术)
支持任意 Minecraft 玩家的自定义皮肤
点击 NPC 时触发的动作系统
NPC 头顶悬浮文字(全息文本)
简洁直观的命令体系
轻量级设计,针对服务器性能优化
# DK NPC
## 功能特性
- 使用 `ServerPlayerEntity` 实现真实感 NPC(与 Citizens 插件采用相同技术)
- 支持任意 Minecraft 玩家的自定义皮肤
- 点击 NPC 时触发的动作系统
- NPC 头顶悬浮文字(全息文本)
- 简洁直观的命令体系
- 轻量级设计,针对服务器性能优化
---
## 命令列表
所有命令需要权限等级 2(OP)。
### 基础管理
- `/npc create <name> <skinPlayer>` — 使用指定玩家的皮肤创建 NPC
- `/npc remove <name>` — 删除指定 NPC
- `/npc removeall` — 删除所有 NPC
- `/npc list` — 列出所有已激活的 NPC
- `/npc rename <name> <newName>` — 重命名 NPC
### 位置管理
- `/npc teleport <name> <x> <y> <z>` — 传送 NPC 至指定位置
- `/npc teleport <name> <x> <y> <z> <yaw> <pitch>` — 传送 NPC 并设置朝向角度
### 皮肤管理
- `/npc skin <name> <skinPlayer>` — 更换 NPC 皮肤
### 动作管理(点击 NPC 时触发)
- `/npc action <name> add <action>` — 添加动作
- `/npc action <name> remove <index>` — 删除指定动作
- `/npc action <name> list` — 列出所有动作
- `/npc action <name> clear` — 删除所有动作
### 悬浮文字管理
- `/npc lines <name> add <text>` — 添加一行文字
- `/npc lines <name> remove <index>` — 删除指定行
- `/npc lines <name> list` — 列出所有文字行
- `/npc lines <name> clear` — 删除所有文字行
---
## 动作类型
添加动作时支持以下格式:
- `MESSAGE: <text>` — 向玩家发送消息,支持 `&` 颜色代码
- `PLAYER: <command>` — 以玩家身份执行命令(相当于玩家在聊天栏输入)
- `CONSOLE: <command>` — 通过控制台执行命令
- `/<command>` — 执行服务器命令
在动作内容中使用 `%player%` 可自动替换为当前点击该 NPC 的玩家名。
---
## 使用示例
```
# Create an NPC with Notch skin
/npc create Vendor Notch
# Add lines of text
/npc lines Vendor add &6&lStore
/npc lines Vendor add &7Click to buy!
# Add actions when clicking
/npc action Vendor add MESSAGE: &aHello, %player%!
/npc action Vendor add CONSOLE: give %player% diamond 1
# Teleport the NPC
/npc teleport Vendor 100 64 200 90 0
# Change the skin
/npc skin Vendor jeb_
```
[/MD]