mirror of
https://github.com/BentoBoxWorld/Level.git
synced 2024-12-18 23:27:34 +01:00
Adds the ability to override the level in the IslandLevelCalculatedEvent
https://github.com/BentoBoxWorld/Level/issues/125
This commit is contained in:
parent
b6f4c15469
commit
1de94afe7e
@ -390,7 +390,7 @@ public class CalcIslandLevel {
|
||||
* Set level
|
||||
* @param level - level
|
||||
*/
|
||||
public void setLevel(int level) {
|
||||
public void setLevel(long level) {
|
||||
this.level.set(level);
|
||||
}
|
||||
/**
|
||||
|
@ -60,13 +60,22 @@ public class IslandLevelCalculatedEvent extends IslandBaseEvent {
|
||||
return results.getLevel();
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Overwrite the level. This level will be used instead of the calculated level.
|
||||
* @param level - the level to set
|
||||
*/
|
||||
public void setLevel(long level) {
|
||||
results.setLevel(level);
|
||||
}
|
||||
|
||||
/**
|
||||
* @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
|
||||
*/
|
||||
@ -95,5 +104,4 @@ public class IslandLevelCalculatedEvent extends IslandBaseEvent {
|
||||
this.targetPlayer = targetPlayer;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user