# NPCs

RageMode comes with built-in NPC system for creating [passive entities](https://minecraft.wiki/w/Entity) to perform specific commands on player interaction with them. This feature was created as an extra functionality only. It is not intended to replace existing NPC plugins.

### Features

* Create as many NPCs as your server and system allows
* Option to attach any type of command to execute on interaction
* Select from [wide range of entity types](https://jd.papermc.io/paper/org/bukkit/entity/EntityType.html) (only [alive](https://jd.papermc.io/paper/org/bukkit/entity/EntityType.html#isAlive\(\)) and [spawnable](https://jd.papermc.io/paper/org/bukkit/entity/EntityType.html#isSpawnable\(\)) entities can be created)
* Set a custom name for your NPC
* Can not be removed using `minecraft:kill` command nor despawned
* Select from different types of actions:
  * `lobby_shop`, `skills`, `missions`, `leader_board`, `stats`, `perform_command`

### Creation

To create an entity NPC use `/rm npc create <name> <actionType> <entityType> [customName]` command.

{% hint style="info" %}
When creating NPCs make sure there is at least 2 blocks distance between each entity, otherwise you can not create a new one.
{% endhint %}

Parameters:

* `name` - The name of the NPC for identifier
* `actionType` - The action to do on player interaction which can be either
  * `lobby_shop`, `skills`, `missions`, `leader_board`, `stats`, `perform_command`
* `entityType` - The [entity type](https://jd.papermc.io/paper/org/bukkit/entity/EntityType.html) to summon
* `customName` - (Optional) A custom name that appears above the NPC entity

An example demonstrating NPC creation:

<figure><img src="/files/ivvXfPrs1YVlWHccdKJT" alt=""><figcaption></figcaption></figure>

After creating the entity NPC, you can now remove, modify custom name, command and even entity type as well using `/rm npc edit <name> customName/command/entityType <key>` command.

Parameters:

1. `name` - The name of the created NPC
2. `customName`, `command`, `entityType` - Action to do
3. `key` if the argument is either
   1. `customName` - specify a name to display above the entity
   2. `command` - specify an existing command to execute on interaction
   3. `entityType` - select an [EntityType](https://jd.papermc.io/paper/org/bukkit/entity/EntityType.html) to change into

### Removing

You have 3 options to remove NPCs:

1. Use `/rm npc remove` command and interact with the NPC
2. Use `/rm npc remove near` command to remove closest NPC
3. Use `/rm npc remove <npcName>` command to remove by NPC name


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://mdswork.gitbook.io/ragemode-docs/guides/npcs.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
