HomeJavaModsSimpleNPCs
简体中文

SimpleNPC

SimpleNPC 是一款极其轻量的 Minecraft 实体 NPC 插件,它唯一的功能就是右键配置过的实体时,执行一系列命令。你几乎不需要学习任何新的内容,也不需要花费时间调节配置文件,就能立刻掌握其使用方式。

本插件不依赖外部数据库,采用纯标签驱动架构。它不负责实体的生成或物理属性的修改,而是将交互逻辑直接储存在实体的 PDC 中。任何非玩家实体均可作为 NPC,数据与原版区块同步保存与销毁。


核心特性


快速上手

第一步:生成实体 使用原版命令或生成蛋召唤一个实体,并配置所需的属性(如无敌、无重力等):

/summon minecraft:mannequin ~ ~ ~ {Invulnerable:1b,NoGravity:1b}

第二步:绑定命令 使用插件提供的选择器,向该实体注入需要触发的命令:

/npc add @n[type=mannequin] say 欢迎来到这里,%player_name%!
/npc add @n[type=mannequin] player:spawn

第三步:玩家交互 玩家右键点击该实体,系统将按顺序执行绑定的命令。


命令与权限

所有命令默认需要 pronpc.admin 权限。命令目标 <target> 支持 Minecraft 原版目标选择器。

命令 说明
/npc reload 重载配置文件。
/npc list <target> 列出目标实体 PDC 中绑定的所有命令。在聊天框输出,点击对应行可复制内容。
/npc add <target> <command> 向目标实体追加交互命令。若目标原先无 PDC 标签,会自动初始化。
/npc remove <target> <index> 根据列表索引移除指定命令。若列表被清空,实体的 NPC 标签将被移除。

注:目标选择器仅允许选择一个实体。


配置文件 (config.yml)

# NPC 交互全局冷却时间(单位:秒)
cooldown-seconds: 3.0

开发者参考

插件的底层数据结构如下:

English

Translated by AI,Sorry for possible grammar mistakes.

SimpleNPC

SimpleNPC is an extremely lightweight Minecraft entity NPC plugin. Its sole function is to execute a series of commands when a player right-clicks a configured entity. You needn't to learn much new things or spent lots of time configuring it to master its usage.

This plugin does not rely on any external database; it uses a purely tag-driven architecture. It does not handle entity spawning or modify physical attributes — instead, it stores interaction logic directly in the entity's PDC. Any non-player entity can serve as an NPC, and the data is saved and destroyed synchronously with vanilla chunks.


Core Features


Quick Start

Step 1: Spawn an entity
Use a vanilla command or a spawn egg to summon an entity and configure desired attributes (e.g., invulnerable, no gravity):

/summon minecraft:mannequin ~ ~ ~ {Invulnerable:1b,NoGravity:1b}

Step 2: Bind commands
Use the plugin's selectors to inject commands that should be triggered by the entity:

/npc add @n[type=mannequin] say Welcome, %player_name%!
/npc add @n[type=mannequin] player:spawn

Step 3: Player interaction
When a player right-clicks the entity, the system executes the bound commands in order.


Commands & Permissions

All commands require the pronpc.admin permission by default. The command target <target> supports Minecraft native target selectors.

Command Description
/npc reload Reloads the configuration file.
/npc list <target> Lists all commands bound in the target entity's PDC. Outputs to chat; clicking a line copies its content.
/npc add <target> <command> Appends an interaction command to the target entity. If the target has no PDC tag yet, it will be initialized automatically.
/npc remove <target> <index> Removes the command at the given list index. If the list becomes empty, the entity's NPC tag is removed.

Note: The target selector must match exactly one entity.


Configuration (config.yml)

# Global interaction cooldown for NPCs (in seconds)
cooldown-seconds: 3.0

Developer Reference

The underlying data structure of the plugin is as follows:

Quick facts

Install steps are the general flow for this file type — How to install Minecraft Java mods & modpacks walks through it step by step.

Verified by MCModsHub

These come from our own check of the pack file, not from the source page.

Explore more