> For the complete documentation index, see [llms.txt](https://flintdl.gitbook.io/rastrum/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://flintdl.gitbook.io/rastrum/getting-started/setup.md). Agents can also search and read this documentation through its [MCP server](https://flintdl.gitbook.io/rastrum/~gitbook/mcp).

# 3. Setup

## manifest.json

Declare Rastrum so your mod loads after it:

```json
"OptionalDependencies": { "Flintdl:Rastrum": "*" }
```

Use `Dependencies` instead only if your mod makes no sense without Rastrum.

## build.gradle.kts

Compile against the jar without bundling it:

```kotlin
compileOnly(files("libs/Rastrum-0.5.0.jar"))
```

{% hint style="warning" %}
Never copy Rastrum's classes into your jar. They would be different classes from the ones the server loaded, and `available()` would always say `false`.
{% endhint %}

## When Rastrum is optional

If the server does not have Rastrum, any class that mentions `RastrumApi` fails to load. Keep those calls in one small class of yours and reach it only after checking:

```java
public final class Trails {
    static boolean guide(PlayerRef player, double x, double y, double z, String name) {
        try {
            return RastrumApi.available() && RastrumApi.guide("MyMod", player, x, y, z, name);
        } catch (NoClassDefFoundError e) {
            return false; // Rastrum not installed
        }
    }
}
```
