Skip to content

Project Setup

To use Bestium, you need to start with a working Paper plugin setup. Your build must use either Gradle Kotlin DSL or Gradle Groovy DSL. Maven cannot be used, because paperweight-userdev does not support Maven.

You can write your plugin code in either Java or Kotlin. Kotlin is recommended for its expressiveness, but fully optional.

To use Bestium in your plugin project, you’ll need two dependencies:

Your Gradle build configuration should look something like this:

build.gradle.kts
plugins {
id("io.papermc.paperweight.userdev") version "2.0.0-beta.17"
}
repositories {
mavenCentral()
}
dependencies {
compileOnly("cz.jeme:bestium:1.1.0")
paperweight.paperDevBundle("MINECRAFT_VER-R0.1-SNAPSHOT")
}

Replace MINECRAFT_VER with the Minecraft version Bestium requires.

Once your build is synced, you should be able to import main Bestium class:

import cz.jeme.bestium.api.Bestium

To use Bestium, your plugin must be a Paper plugin.

This means replacing your plugin.yml with a paper-plugin.yml.

Follow this guide to migrate from Bukkit to Paper plugin format.

Bootstrappers allow you to run code very early in the Minecraft server’s startup sequence. This is essential for registering custom entities with Bestium before datapacks (and biomes) are loaded.

To use a bootstrapper:

  1. Implement the PluginBootstrap interface:
    MyPluginBootstrapper.kt
    package com.example.myplugin
    import io.papermc.paper.plugin.bootstrap.BootstrapContext
    import io.papermc.paper.plugin.bootstrap.PluginBootstrap
    @Suppress("UnstableApiUsage")
    internal class MyPluginBootstrapper : PluginBootstrap {
    override fun bootstrap(context: BootstrapContext) {
    // Here the injection will happen
    }
    }
  2. Register your class:
    paper-plugin.yml
    bootstrapper: com.example.myplugin.MyPluginBootstrapper