World Border replaces vanilla Minecraft's /worldborder command with a config-driven, per-world border for Eternal Empires. Instead of setting borders in-game (and having them reset on world reload or forgotten after a restart), each world's border is defined once in a config file and enforced consistently every time the world loads.
On startup, the plugin unregisters vanilla's /worldborder command entirely — border configuration is meant to happen through worlds.yml, not in-game commands — and applies the configured border (center coordinates and size) to each world as it loads, via a WorldLoadListener. Other plugins can check whether a location falls inside or outside a world's border through the API rather than reimplementing the coordinate math.
WorldBorderProvider resolves the WorldBorder for a given world. A WorldBorder exposes its center coordinates and size, plus isInsideBorder(x, z)/isOutsideBorder(x, z) checks — useful for anything that needs to validate a location before teleporting a player there or generating something at a given position.
api— the publicWorldBorder/WorldBorderProviderinterfaces. No implementation, published for other plugins to depend on.common— the implementation backing the API.paper— the Paper plugin: unregisters the vanilla command, loadsworlds.yml, and applies borders as worlds load.
Java 21 and Paper 1.20 or newer.
./gradlew buildTo get a plugin jar, build the paper module's shadow jar:
./gradlew paper:shadowJarThe resulting jar is written to paper/build/libs/.
On first run, worlds.yml is generated under plugins/worldborder/, one entry per world:
world:
size: 100
center:
x: 0
z: 0Add an entry for each world you want a border on; worlds without an entry are left unrestricted.
If your plugin needs to check whether a location is inside a world's border, depend on worldborder-api instead of duplicating the bounds check:
repositories {
maven {
url 'https://packages.eternalempires.net'
}
}
dependencies {
compileOnly 'net.eternalempires:worldborder-api:VERSION'
}Replace VERSION with the release you want to target — see the Releases page for available versions.
See LICENSE.
See CONTRIBUTING.md.