From de8b85a4c162ab584a636a73bbb0dc410a311414 Mon Sep 17 00:00:00 2001 From: Ben Woo <30431861+benwoo1110@users.noreply.github.com> Date: Mon, 15 Mar 2021 14:05:07 +0800 Subject: [PATCH] Updated Developer API Starter (markdown) --- Developer-API-Starter.md | 21 ++++++++++++--------- 1 file changed, 12 insertions(+), 9 deletions(-) diff --git a/Developer-API-Starter.md b/Developer-API-Starter.md index bfd4533..b425ee4 100644 --- a/Developer-API-Starter.md +++ b/Developer-API-Starter.md @@ -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 @@ -32,8 +32,8 @@ As for the version, use the latest release version based on their respective Buk ``` -#### 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)) \ No newline at end of file +* [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 ;) \ No newline at end of file