mirror of
https://github.com/plan-player-analytics/Plan.git
synced 2025-02-21 06:42:00 +01:00
Updated APIv4 (markdown)
parent
db2c493a22
commit
db894a7c3e
22
APIv4.md
22
APIv4.md
@ -3,16 +3,6 @@
|
||||
|
||||
This page is about the API that is available in **version 4.1.5** and above, mainly how to register data from your plugin to be displayed on the website.
|
||||
|
||||
If you're using Maven, you can use this as the dependency information.
|
||||
```
|
||||
<dependency>
|
||||
<groupId>com.djrapitops</groupId>
|
||||
<artifactId>Plan</artifactId>
|
||||
<version>4.2.0-SNAPSHOT</version>
|
||||
<scope>provided</scope>
|
||||
</dependency>
|
||||
```
|
||||
|
||||
API can be called on Bukkit & Bungee.
|
||||
|
||||
**The API PluginData functionality is available, but limited on Bungee**
|
||||
@ -27,9 +17,19 @@ API can be called on Bukkit & Bungee.
|
||||
## Accessing API
|
||||
Install the Plan.jar as a local dependency if you're using Maven. Add soft-depend or depend in the plugin.yml
|
||||
|
||||
Maven dependency information.
|
||||
```
|
||||
<dependency>
|
||||
<groupId>com.djrapitops</groupId>
|
||||
<artifactId>Plan</artifactId>
|
||||
<version>4.2.0-SNAPSHOT</version>
|
||||
<scope>provided</scope>
|
||||
</dependency>
|
||||
```
|
||||
Getting PlanAPI instance
|
||||
```
|
||||
try {
|
||||
API planAPI = Plan.getPlanAPI();
|
||||
PlanAPI planAPI = PlanAPI.getInstance();
|
||||
} catch (IllegalStateException e) {
|
||||
// Plan has not enabled properly
|
||||
} catch (NoClassDefFoundError e) {
|
||||
|
Loading…
Reference in New Issue
Block a user