Added setting Island.Levelling.ScanAutomatically

This commit is contained in:
Esophose 2019-05-26 20:31:00 -06:00
parent 4e988d15dc
commit 55e2055907
2 changed files with 8 additions and 2 deletions

View File

@ -258,7 +258,9 @@ public class IslandManager {
.setBiome(island, biome), 20L);
// Recalculate island level after 5 seconds
if (fileManager.getConfig(new File(this.skyblock.getDataFolder(), "language.yml")).getFileConfiguration().getBoolean("Island.Levelling.ScanAutomatically")) {
Bukkit.getServer().getScheduler().runTaskLater(skyblock, () -> skyblock.getLevellingManager().calculatePoints(null, island), 100L);
}
return true;
}
@ -811,8 +813,10 @@ public class IslandManager {
pasteStructure(island, islandWorld);
// Recalculate island level after 5 seconds
if (fileManager.getConfig(new File(this.skyblock.getDataFolder(), "language.yml")).getFileConfiguration().getBoolean("Island.Levelling.ScanAutomatically")) {
Bukkit.getServer().getScheduler().runTaskLater(skyblock, () -> skyblock.getLevellingManager().calculatePoints(null, island), 100L);
}
}
/**
* Checks if an island world is unlocked

View File

@ -174,6 +174,8 @@ Island:
# time cycle or be fixed.
Cycle: false
Levelling:
# Run a scan automatically when pasting an island structure
ScanAutomatically: true
# Include Points: 0 in the '/is level' GUI
IncludeEmptyPointsInList: true
# Island Level Points divided by value