mirror of
https://github.com/BentoBoxWorld/Level.git
synced 2024-12-18 23:27:34 +01:00
Makes result of the IslandLevelCalculatedEvent easier for plugins to get
https://github.com/BentoBoxWorld/Level/issues/118
This commit is contained in:
parent
187e491bea
commit
d8b838cc36
2
pom.xml
2
pom.xml
@ -65,7 +65,7 @@
|
||||
<!-- Do not change unless you want different name for local builds. -->
|
||||
<build.number>-LOCAL</build.number>
|
||||
<!-- This allows to change between versions. -->
|
||||
<build.version>1.9.2</build.version>
|
||||
<build.version>1.9.3</build.version>
|
||||
</properties>
|
||||
|
||||
<!-- Profiles will allow to automatically change build version. -->
|
||||
|
@ -1,5 +1,6 @@
|
||||
package world.bentobox.level.event;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.UUID;
|
||||
|
||||
import world.bentobox.bentobox.api.events.IslandBaseEvent;
|
||||
@ -29,11 +30,49 @@ public class IslandLevelCalculatedEvent extends IslandBaseEvent {
|
||||
}
|
||||
|
||||
/**
|
||||
* Do NOT get this result if you are not a BentoBox addon!
|
||||
* @return the results
|
||||
*/
|
||||
public Results getResults() {
|
||||
return results;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return death handicap value
|
||||
*/
|
||||
public int getDeathHandicap() {
|
||||
return results.getDeathHandicap();
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the island's initial level. It may be zero if it was never calculated
|
||||
* or if a player was registered to the island after it was made.
|
||||
* @return initial level of island as calculated when the island was created.
|
||||
*/
|
||||
public long getInitialLevel() {
|
||||
return results.getInitialLevel();
|
||||
}
|
||||
|
||||
/**
|
||||
* @return the level calculated
|
||||
*/
|
||||
public long getLevel() {
|
||||
return results.getLevel();
|
||||
}
|
||||
|
||||
/**
|
||||
* @return number of points required to next level
|
||||
*/
|
||||
public long getPointsToNextLevel() {
|
||||
return results.getPointsToNextLevel();
|
||||
}
|
||||
|
||||
/**
|
||||
* @return a human readable report explaining how the calculation was made
|
||||
*/
|
||||
public List<String> getReport() {
|
||||
return results.getReport();
|
||||
}
|
||||
|
||||
/**
|
||||
* @return the targetPlayer
|
||||
@ -42,6 +81,7 @@ public class IslandLevelCalculatedEvent extends IslandBaseEvent {
|
||||
return targetPlayer;
|
||||
}
|
||||
/**
|
||||
* Do not use this if you are not a BentoBox addon
|
||||
* @param results the results to set
|
||||
*/
|
||||
public void setResults(Results results) {
|
||||
|
Loading…
Reference in New Issue
Block a user