mirror of
https://github.com/ME1312/SubServers-2.git
synced 2024-11-22 10:15:52 +01:00
Updated SubAPI (markdown)
parent
2bd5f48cf3
commit
90efd78a0b
@ -31,7 +31,7 @@ You may want to use Maven to handle the SubAPI dependency for you. If so, here's
|
|||||||
### Using SubAPI as a Soft Dependancy
|
### 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.
|
A "Soft Dependancy" is where your plugin will use SubServers, but it is not required for your plugin to function properly.
|
||||||
|
|
||||||
First, Make a method to see if SubServers v2.11.2a+ is available using reflection:
|
First, Make a method to see if, for example, SubServers v2.14a+ is available using reflection:
|
||||||
```java
|
```java
|
||||||
public boolean isSubServers2() {
|
public boolean isSubServers2() {
|
||||||
try {
|
try {
|
||||||
@ -53,7 +53,7 @@ So what happens here is:<br>
|
|||||||
|
|
||||||
__Pro-Tips for using SubServers as a Soft-Dependancy:__
|
__Pro-Tips for using SubServers as a Soft-Dependancy:__
|
||||||
* Make sure SubServers is available using the above method before accessing SubServers classes
|
* Make sure SubServers is available using the above method before accessing SubServers classes
|
||||||
* Never use imports for classes starting with "net.ME1312"<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();`
|
* Never use imports for classes starting with "net.ME1312"<br>`new Version(1);` is now `new net.ME1312.Galaxi.Library.Version.Version(1);`<br>`SubAPI.getInstance();` is now `net.ME1312.SubServers.Bungee.SubAPI.getInstance();`
|
||||||
|
|
||||||
## SubServers.Bungee
|
## SubServers.Bungee
|
||||||
This will show how to use SubAPI for SubServers.Bungee. For more detailed information visit this page:<br>
|
This will show how to use SubAPI for SubServers.Bungee. For more detailed information visit this page:<br>
|
||||||
|
Loading…
Reference in New Issue
Block a user