-
Notifications
You must be signed in to change notification settings - Fork 303
Developer API Starter
This document outlines the basics of how plugin developers can read and modify Multiverse data to enhance world management on their server.
All Multiverse modules are hosted on our very own nexus repository.
To replace the placeholders with the various artifactId for Multiverse modules are:
- Multiverse-Core
- Multiverse-Inventories
- Multiverse-Portals
- Multiverse-NetherPortals
- Multiverse-SignPortals
As for the version, use the latest release version based on their respective Bukkit site.
<repositories>
<repository>
<id>OnARandomBox</id>
<url>https://repo.onarandombox.com/content/groups/public/</url>
</repository>
</repositories>
<dependencies>
<dependency>
<groupId>com.onarandombox.multiverse[MODULE (in lowercase)]</groupId> <!-- Don't forget to replace this -->
<artifactId>Multiverse-[MODULE]</artifactId> <!-- Replace this as well -->
<version>[VERSION]</version> <!-- This too -->
<scope>provided</scope>
</dependency>
</dependencies>
repositories {
maven { url = "https://repo.onarandombox.com/content/groups/public/" }
}
dependencies {
compileOnly 'com.onarandombox.multiverse[MODULE (in lowercase)]:Multiverse-[MODULE]:[VERSION]'
}
If you wish to download the dependency to classpath, you can do the following:
- Navigate to https://repo.onarandombox.com/content/groups/public/com/onarandombox/.
- Click into the directory of the Multiverse modules you wish to have.
- Select the
Multiverse-[MODULE]-[VERSION].jar
.
Multiverse-Core:
MultiverseCore core = (MultiverseCore) Bukkit.getServer().getPluginManager().getPlugin("Multiverse-Core");
Multiverse-Inventories
MultiverseInventories inventories = (MultiverseInventories) Bukkit.getServer().getPluginManager().getPlugin("Multiverse-Inventories");
Multiverse-Portals
MultiversePortals portals = (MultiversePortals) Bukkit.getServer().getPluginManager().getPlugin("Multiverse-Portals");
Multiverse-NetherPortals
MultiverseNetherPortals netherportals = (MultiverseNetherPortals) Bukkit.getServer().getPluginManager().getPlugin("Multiverse-NetherPortals");
To ensure that getting the plugin instance of Multiverse does not result in an NPE, for all the modules you use, you need to add them as depend
or softdepend
in plugins.yml
. As example as follows:
name: FlyPerms
main: dev.benergy10.flyperms
authors: benwoo1110
softdepend: ['Multiverse-Core', 'Multiverse-Inventories']
It is also possible to listen to PluginEnableEvent
and PluginDisableEvent
to detect when a Multiverse module is enabled/disabled.
We have curated a bunch of common usages for the various multiverse modules:
- Multiverse-Core API Usage
- Multiverse-Inventories API Usage
- Multiverse-Portals API Usage
- Multiverse-NetherPortals API Usage
Feel free to join our discord or open a issue, people who can help will reply ;)
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):