Merge branch 'develop' of https://github.com/BentoBoxWorld/BentoBox.git into develop

This commit is contained in:
tastybento 2019-08-26 19:17:32 -07:00
commit ab81074c4d
2 changed files with 11 additions and 4 deletions

View File

@ -128,7 +128,8 @@ public class BStats {
private void registerPlayersPerServerChart() {
metrics.addCustomChart(new Metrics.SimplePie("playersPerServer", () -> {
int players = Bukkit.getOnlinePlayers().size();
if (players <= 10) return "0-10";
if (players <= 0) return "0";
else if (players <= 10) return "1-10";
else if (players <= 30) return "11-30";
else if (players <= 50) return "31-50";
else if (players <= 100) return "51-100";

View File

@ -62,7 +62,6 @@ public class CleanSuperFlatListener extends FlagListener {
@EventHandler(priority = EventPriority.LOW, ignoreCancelled = true)
public void onChunkLoad(ChunkLoadEvent e) {
World world = e.getWorld();
if (noClean(world, e)) {
return;
@ -71,7 +70,13 @@ public class CleanSuperFlatListener extends FlagListener {
ChunkGenerator cg = plugin.getAddonsManager().getDefaultWorldGenerator(world.getName(), "");
if (cg == null) {
Flags.CLEAN_SUPER_FLAT.setSetting(world, false);
getPlugin().logWarning("Clean super flat is not available for " + world.getName());
plugin.logWarning("Could not enable Clean Super Flat for " + world.getName());
plugin.logWarning("There is no world generator assigned to this world.");
plugin.logWarning("This is often caused by the 'use-own-generator' being set to 'true' in the gamemode's" +
" configuration while there hasn't been any custom world generator assigned to the world.");
plugin.logWarning("Either revert the changes in the gamemode's config.yml or assign your custom world generator to the world.");
return;
}
// Add to queue
@ -96,7 +101,8 @@ public class CleanSuperFlatListener extends FlagListener {
// Run populators
cg.getDefaultPopulators(world).forEach(pop -> pop.populate(world, random, e.getChunk()));
if (plugin.getSettings().isLogCleanSuperFlatChunks()) {
plugin.log(chunkQueue.size() + " Regenerating superflat chunk " + world.getName() + " " + chunkXZ.x + ", " + chunkXZ.z);
plugin.log("Regenerating superflat chunk in " + world.getName() + " at (" + chunkXZ.x + ", " + chunkXZ.z + ") " +
"(" + chunkQueue.size() + " chunk(s) remaining in the queue)");
}
} else {
task.cancel();