Added Subtract

This commit is contained in:
Fabrizio La Rosa 2020-06-12 23:34:08 +02:00
parent 77cef81ed1
commit 6eefa49d87
2 changed files with 11 additions and 1 deletions

View File

@ -114,7 +114,15 @@ public class IslandLevel {
division = 1;
}
return getPoints() / division;
long points = getPoints();
long subtract = skyblock.getFileManager().getConfig(new File(skyblock.getDataFolder(), "config.yml")).getFileConfiguration().getLong("Island.Levelling.Subtract");
if(points >= subtract){
points -= subtract;
} else {
points = 0;
}
return points / division;
}
public void checkLevelUp() {

View File

@ -191,6 +191,8 @@ Island:
IncludeEmptyPointsInList: true
# Island Level Points divided by value
Division: 100
# Points to subtract to Island Level Points
Subtract: 1000
Cooldown:
# Time until Island level rescan expires
Time: 60