> 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
