TemplateWorld is an AllayMC plugin that allows you to create runtime-only worlds based on template worlds. It is designed for mini-game servers where you need to create temporary game rooms that are automatically cleaned up after use. 🎮
- 🗺️ Create temporary worlds from pre-defined templates
- 💨 Runtime-only worlds that won't persist to disk
- 📦 Support for different world storage formats (LEVELDB, etc.)
- 🧹 Automatic cleanup of temporary world files on server restart
- 🔌 Simple API for programmatic world creation
- 📦 Download the latest release from Releases
- 📂 Place the JAR file in your server's
pluginsfolder - 🚀 Start the server
- Create a folder named
templatesin your server root directory - Copy your world folder into
templates/ - The folder name will be used as the template name
server/
├── templates/
│ ├── lobby/
│ ├── bedwars_map1/
│ └── skywars_map1/
└── ...
| Command | Description | Permission |
|---|---|---|
/template create <template_name> |
Create a temporary world from a template | templateworld.command |
First, you should add the dependency to your project:
repositories {
mavenCentral()
}
dependencies {
compileOnly(group = "org.allaymc", name = "template-world", version = "0.1.0")
}You can use the API to create temporary worlds programmatically:
import org.allaymc.templateworld.TemplateWorld;
import org.allaymc.api.world.World;
// Create a temporary world using default LEVELDB format
World tmpWorld = TemplateWorld.createTmpWorld("bedwars_map1");
// Create with custom formats
World tmpWorld = TemplateWorld.createTmpWorld(
"bedwars_map1", // template name
"LEVELDB", // template format
"LEVELDB" // temporary world format
);
// The world is automatically marked as runtime-only
// and will be cleaned up when unloaded- 📂 Template worlds are stored in the
templates/directory - 📖 When a temporary world is created, chunks are read from the template but written to a temporary location (
worlds/.tmp/) - 🔑 Each temporary world gets a unique UUID as its name
- ⏳ The world is marked as
runtimeOnly, so it won't persist after unloading - 🔄 On server restart, all temporary world files are automatically cleaned up
This project is licensed under the LGPL v3 License - see the LICENSE file for details.