
# Polar world format for Paper
Polar is a world format very similar to Slime, with similar advantages:
- Small file sizes (see [SLIME_COMPARISON](https://github.com/MinehubMC/PolarPaper/blob/main/SLIME_COMPARISON.md))
- Single file world
- Immutable (worlds do not save until explicitly requested)
- Store worlds wherever (whether as a file or in a database)
- Great for lobbies and game arenas
- Fast loading and saving
Polar supports loading both .polar and .slime worlds out of the box.
Polar is also a single plugin and so doesn't require a Paper fork or classloaders
Polar currently supports versions 26.3 - 1.21.11, and requires minimum Java 25
Polar was originally developed for [Minestom](https://github.com/Minestom/Minestom), see the Minestom loader [here](https://github.com/hollow-cube/polar)
[Support Discord](https://discord.gg/n7fp52auB7)
## Large worlds
Polar is not designed for large worlds!
Polar is most useful when the whole world is mostly within render distance. The entire world is held in memory as a trade-off to allow for faster loading. This means the size/number of worlds you can load depends on how much RAM you have available.
If you need large worlds, it's likely Anvil (the default world format) will be more useful.
## Permissions
Permission nodes are simply `polarpaper.`, for example: `polarpaper.info` for `/polar info`
`polarpaper.use` for the root command (/polar)
## API
Remember to add `polarpaper` to your depend list in plugin.yml if using as a plugin/compileOnly
```yml
depend:
- polarpaper
```
Add to Gradle:
```kts
repositories {
maven("https://repo.minehub.live/releases")
}
dependencies {
compileOnly("live.minehub:polarpaper:")
}
```
Load a polar world
```java
// Manually
Path path = Path.of("path/to/world.polar");
String worldName = path.getFileName().toString().split("\\.polar")[0];
byte[] bytes;
try {
// This example shows reading a world from a file, however
// as long as you can read and write an array of bytes, you can read it
// from wherever you want - including mysql and redis!
bytes = Files.readAllBytes(path);
} catch (IOException e) {
throw new RuntimeException(e);
}
PolarWorld polarWorld = PolarReader.read(bytes);
Polar.loadWorld(polarWorld, worldName);
// or by using config
Polar.loadWorldConfigSource("gamingworld");
```
Save a polar world
```java
// Using config (same as /polar save)
World bukkitWorld = player.getWorld();
Polar.saveWorldConfigSource(bukkitWorld);
// Custom source
World bukkitWorld = player.getWorld();
Path savePath = Path.of("./epic/world.polar");
// feel free to use your own PolarSource class
PolarSource source = new FilePolarSource(savePath);
Polar.saveWorld(bukkitWorld, source);
```
Get the `PolarWorld` that a player is in
```java
PolarWorld polarWorld = PolarWorld.fromWorld(player.getWorld());
// (returns null if the world is not from PolarPaper)
```
Register events
```java
// If you're not running the PolarPaper plugin and instead using it exclusively
// as a dependency (e.g. implementation instead of compileOnly), you do not need to
// add it to the depend list in your plugin.yml. However, in order to allow entities
// to be read and spawned automatically, you must manually register the plugin listeners:
PolarPaper.registerEvents();
```
Quick facts
- Edition: Minecraft Java
- File type: .jar
- Minecraft versions listed: 1.21.10, 1.21.11, 1.21.3
- How to install: Install the matching mod loader (Forge, Fabric or NeoForge) for your Minecraft version. → Download the .jar. → Put it in the .minecraft/mods folder and launch that loader profile.
- Where to get it: Opens on Hangar — not every file is mirrored on our own servers.
Install steps are the general flow for this file type — How to install Minecraft Java mods & modpacks walks through it step by step.
Polar is a free Minecraft Java mod. Compatible with Minecraft 1.21.10, 1.21.11, 1.21.3, 1.21.4 and newer. Downloaded 94 times (via Hangar). Download it and open it directly in the game.
Explore more