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
|
* Set level
|
||||||
* @param level - level
|
* @param level - level
|
||||||
*/
|
*/
|
||||||
public void setLevel(int level) {
|
public void setLevel(long level) {
|
||||||
this.level.set(level);
|
this.level.set(level);
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
|
@ -60,6 +60,15 @@ public class IslandLevelCalculatedEvent extends IslandBaseEvent {
|
|||||||
return results.getLevel();
|
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
|
* @return number of points required to next level
|
||||||
*/
|
*/
|
||||||
@ -95,5 +104,4 @@ public class IslandLevelCalculatedEvent extends IslandBaseEvent {
|
|||||||
this.targetPlayer = targetPlayer;
|
this.targetPlayer = targetPlayer;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user