-
Notifications
You must be signed in to change notification settings - Fork 307
API Usages
This pages provides examples and explanation for the common API usages of Multiverse-Core introduced here. It's impossible to cover all API methods in this guide, but rest assured we have javadocs and source code provided.
The MVWorldManager interface is the heart of managing worlds in Multiverse. You can use various methods in this class to create, delete, regen worlds and much more!
MVWorldManager worldManager = core.getMVWorldManager();
If you are unsure of getting the Multiverse-Core instance, see here.
Lets now create a new overworld called creative
.
worldManager.addWorld(
"creative", // The worldname
World.Environment.NORMAL, // The overworld environment type.
null, // The world seed. Any seed is fine for me, so we just pass null.
WorldType.NORMAL, // Nothing special. If you want something like a flat world, change this.
true, // This means we want to structures like villages to generator, Change to false if you don't want this.
null // Specifies a custom generator. We are not using any so we just pass null.
);
Things to note:
- World names follow the Bukkit API's
NamespacedKey
, which means it does not allow spaces or special characters.
You may want to unload worlds when unused and load them back when it's needed.
// unloading
worldManager.unloadWorld("creative");
// loading
worldManager.loadWorld("creative");
Things to note:
- You cannot unload the default world defined in
level-name
ofserver.properties
. - You can only load worlds that are known by Multiverse, use the
MVWorldManager#addWorld
method mentioned previously.
Getting Started
Configuration
- Config.yml
- World Properties
- Destinations
- Currency
- Custom Generator Plugins
- Anchor Tutorial
- Placeholders
Help
Developers
Other
Getting Started
Configuration
Developers
Getting Started
Configuration
Help
Developers
Getting Started
Configuration
Help
Developers
Getting Started
Configuration
A great place to get help is from Multiverse's Discord (Click the logo for invite link):