mirror of
https://github.com/Multiverse/Multiverse-Core.git
synced 2024-11-22 02:25:41 +01:00
Updated Developer API Starter (markdown)
parent
eef257f21b
commit
de8b85a4c1
@ -13,7 +13,7 @@ To replace the placeholders with the various artifactId for Multiverse modules a
|
||||
|
||||
As for the version, use the latest release version based on their respective Bukkit site.
|
||||
|
||||
#### Maven
|
||||
### Maven
|
||||
```xml
|
||||
<repositories>
|
||||
<repository>
|
||||
@ -32,8 +32,8 @@ As for the version, use the latest release version based on their respective Buk
|
||||
</dependencies>
|
||||
```
|
||||
|
||||
#### Gradle
|
||||
```
|
||||
### Gradle
|
||||
```gradle
|
||||
repositories {
|
||||
maven { url = "http://repo.onarandombox.com/content/groups/public/" }
|
||||
}
|
||||
@ -43,11 +43,11 @@ dependencies {
|
||||
}
|
||||
```
|
||||
|
||||
#### Mannual
|
||||
### Mannual
|
||||
If you wish to download the dependency to classpath, you can do the following:
|
||||
1. Navigate to https://repo.onarandombox.com/content/groups/public/com/onarandombox/.
|
||||
1. Download the Multiverse modules you wish to have.
|
||||
1. Select the `Multiverse-[MODULE]-[VERSION].jar`
|
||||
1. Click into the directory of the Multiverse modules you wish to have.
|
||||
1. Select the `Multiverse-[MODULE]-[VERSION].jar`.
|
||||
|
||||
## Getting the Multiverse plugin instances
|
||||
Multiverse-Core:
|
||||
@ -72,7 +72,7 @@ MultiverseNetherPortals netherportals = (MultiverseNetherPortals) Bukkit.getServ
|
||||
|
||||
## Useful information
|
||||
|
||||
#### Make sure Multiverse is loaded
|
||||
### Make sure Multiverse is loaded
|
||||
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](https://bukkit.gamepedia.com/Plugin_YAML)`. As example as follows:
|
||||
```yaml
|
||||
name: FlyPerms
|
||||
@ -82,9 +82,12 @@ softdepend: ['Multiverse-Core', 'Multiverse-Inventories']
|
||||
```
|
||||
It is also possible to listen to [`PluginEnableEvent`](https://hub.spigotmc.org/javadocs/bukkit/org/bukkit/event/server/PluginEnableEvent.html) and [`PluginDisableEvent`](https://hub.spigotmc.org/javadocs/bukkit/org/bukkit/event/server/PluginDisableEvent.html) to detect when a Multiverse module is enabled/disabled.
|
||||
|
||||
#### Next steps
|
||||
### Next steps
|
||||
We have curated a bunch of common usages for the various multiverse modules:
|
||||
* [Multiverse-Core API Usage](API-Usages)
|
||||
* [Multiverse-Inventories API Usage](API-Usages-(Inventories))
|
||||
* [Multiverse-Portals API Usage](API-Usages-(Portals))
|
||||
* [Multiverse-NetherPortals API Usage](API-Usages-(NetherPortals))
|
||||
* [Multiverse-NetherPortals API Usage](API-Usages-(NetherPortals))
|
||||
|
||||
#### Questions/Help
|
||||
Feel free to join our [discord](https://discord.gg/NZtfKky) or [open a issue](https://github.com/Multiverse/Multiverse-Core/issues/new/choose), people who can help will reply ;)
|
Loading…
Reference in New Issue
Block a user