-
-
Notifications
You must be signed in to change notification settings - Fork 4
Developers API
Berke Akçen edited this page Jun 27, 2021
·
27 revisions
The project isn't in the Central Repository yet, so specifying a repository is needed.
To add this project as a dependency to your project, add the following to your pom.xml:
<repository>
<id>jitpack.io</id>
<url>https://jitpack.io</url>
</repository>
<dependency>
<groupId>com.github.Despical</groupId>
<artifactId>KOTL</artifactId>
<version>1.2.1</version>
<scope>compile</scope>
</dependency>
repositories {
maven { url 'https://jitpack.io' }
}
dependencies {
compileOnly group: "com.github.Despical", name: "KOTL", version: "1.2.1";
}
This event calls when user's any statistic change.
@EventHandler
public void onStatChange(KOTLPlayerStatisticChangeEvent event){
StatsStorage.StatisticType stat = event.getStatisticType();
int value = event.getNumber();
event.getPlayer().sendMessage("Updated statistic name: " + stat.name() + " , Updated value: " + value);
}
Statistic name (enum) | Statistic identifier (string) (for advanced things) |
Persistent | Description |
---|---|---|---|
TOURS_PLAYED | toursplayed | true | Played tours amounts |
SCORE | score | true | Total score amount |