> For the complete documentation index, see [llms.txt](https://alex-plugins.gitbook.io/ouranos/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://alex-plugins.gitbook.io/ouranos/api/extensions.md).

# Extensions

Ouranos allows plugin owners to register their own sytems to let players use them into Ouranos

### Step 1 - Softdepend&#x20;

Into your plugin.yml add this line to let Ouranos load before your plugin

```
softdepend: [Ouranos]
```

### Step 2 - Register your own tag system

For all of these 3 tag systems, the argument is a standard you define for server owners.

#### NPC tag system

You can register your own NPC tag system into Ouranos to let players use your custom NPCs :&#x20;

```
@Override
public void onEnable() {
    if (getServer().getPluginManager().getPlugin("Ouranos") != null) {
        NPCRegistration.getInstance().registerNPCProvider("your_plugin", new NPCProvider() {
            @Override
            public boolean spawnNPC(String argument, Location location) {
                // TODO Spawn the NPC at the specified location
                return WHATEVER YOU WANT;
            }
            
        });
    }
}
```

This method must spawn the NPC at the specified location. When done, player using Ouranos and your plugin will be able to use your NPC tags as follow :&#x20;

```
npc_1: your_plugin:argument
```

{% hint style="warning" %}
This method must return false if the argument is incorrect
{% endhint %}

#### Mob tag system

You can register your own mob tags to let players use them :

```
@Override
public void onEnable() {
    if (getServer().getPluginManager().getPlugin("Ouranos") != null) {
        MobRegistration.getInstance().registerMobProvider("your_plugin", new MobProvider() {
            @Override
            public LivingEntity spawnMob(String argument, Location location) {
                // TODO Spawn entity at the passed location
                return YOUR ENTITY;
            }
            
        });
    }
}
```

When done, players will be able to use your tags as follow :&#x20;

```
mob_tag: your_plugin:argument
```

{% hint style="warning" %}
If the argument is incorrect, this method must return null
{% endhint %}

#### Item tag system

You can register your own items into Ouranos to let players use them :&#x20;

```
@Override
public void onEnable() {
    if (getServer().getPluginManager().getPlugin("Ouranos") != null) {
        ItemRegistration.getInstance().registerItem("your_plugin", new ItemProvider() {
            @Override
            public ItemStack getItem(String argument) {
                return WHATEVER ITEM YOU WANT;
            }
        });
    }
}
```

Then players using Ouranos and your plugin will be able to use items you defined with this method when an item tag is required :&#x20;

```
item_tag: your_plugin:argument
```

{% hint style="warning" %}
If the passed argument is invalid this method must return null
{% endhint %}

#### Settlement name generator


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## 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, and the optional `goal` query parameter:

```
GET https://alex-plugins.gitbook.io/ouranos/api/extensions.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
