Updated SubAPI (markdown)

ME1312 2017-04-14 14:08:30 -04:00
parent 194ae8b796
commit 551ed619b4

@ -1,10 +1,6 @@
# SubAPI
This page will go over how to properly use SubAPI.
## SubServers.Bungee
This will show how to use SubAPI for SubServers.Bungee. For more detailed information visit this page:<br>
[http://subservers.ME1312.net/Javadoc/SubServers.Bungee/](http://subservers.ME1312.net/Javadoc/SubServers.Bungee/)
### Using SubAPI as a Soft Dependancy
A "Soft Dependancy" is where your plugin will use SubServers, but it is not required for your plugin to function properly.
@ -26,12 +22,16 @@ public boolean isSubServers2() {
So what happens here is:<br>
1. If there is any sort of error getting these classes, return false.<br>
2. If the SubServers Version is less than 2.11.2a, return false.<br>
3. Otherwise, your good to go (return true)<br><br>
3. Otherwise, your good to go (returns true)<br><br>
__Pro-Tips for using SubServers as a Soft-Dependancy:__
* Make sure SubServers is available using the above method before accessing SubServers classes
* Never use imports for classes starting with "net.ME1312" or "org.json"<br>`new Version(1);` is now `new net.ME1312.SubServers.Bungee.Library.Version.Version(1);`<br>`SubAPI.getInstance();` is now `net.ME1312.SubServers.Bungee.SubAPI.getInstance();`
## SubServers.Bungee
This will show how to use SubAPI for SubServers.Bungee. For more detailed information visit this page:<br>
[http://subservers.ME1312.net/Javadoc/SubServers.Bungee/](http://subservers.ME1312.net/Javadoc/SubServers.Bungee/)
### Using SubAPI for Bungee
Most of SubAPI can be accessed using this simple method `SubAPI.getInstance()`, however there's a bit more to it than just that. SubServers.Bungee works by extending BungeeCord classes to add more functionality, and overriding the methods to serve the extended classes. Knowing this, you can use it to your advantage.
@ -67,7 +67,7 @@ This will show how to use SubAPI for SubServers.Host. For more detailed informat
### Creating your plugin
To use SubAPI here, you must create a SubPlugin. This section will detail how this is done, step by step.
__package.yml:__<br>
__package.xml:__<br>
On the root of your jar you must have a file named package.yml or SubAPI won't be able to find your plugin. You can specify multiple main classes by adding multiple `<class>` elements.
```
<package>