mirror of
https://github.com/BentoBoxWorld/BentoBox.git
synced 2024-09-11 22:58:14 +02:00
Merge branch 'develop' of https://github.com/BentoBoxWorld/BentoBox.git into develop
This commit is contained in:
commit
ab81074c4d
@ -128,7 +128,8 @@ public class BStats {
|
|||||||
private void registerPlayersPerServerChart() {
|
private void registerPlayersPerServerChart() {
|
||||||
metrics.addCustomChart(new Metrics.SimplePie("playersPerServer", () -> {
|
metrics.addCustomChart(new Metrics.SimplePie("playersPerServer", () -> {
|
||||||
int players = Bukkit.getOnlinePlayers().size();
|
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 <= 30) return "11-30";
|
||||||
else if (players <= 50) return "31-50";
|
else if (players <= 50) return "31-50";
|
||||||
else if (players <= 100) return "51-100";
|
else if (players <= 100) return "51-100";
|
||||||
|
@ -62,7 +62,6 @@ public class CleanSuperFlatListener extends FlagListener {
|
|||||||
|
|
||||||
@EventHandler(priority = EventPriority.LOW, ignoreCancelled = true)
|
@EventHandler(priority = EventPriority.LOW, ignoreCancelled = true)
|
||||||
public void onChunkLoad(ChunkLoadEvent e) {
|
public void onChunkLoad(ChunkLoadEvent e) {
|
||||||
|
|
||||||
World world = e.getWorld();
|
World world = e.getWorld();
|
||||||
if (noClean(world, e)) {
|
if (noClean(world, e)) {
|
||||||
return;
|
return;
|
||||||
@ -71,7 +70,13 @@ public class CleanSuperFlatListener extends FlagListener {
|
|||||||
ChunkGenerator cg = plugin.getAddonsManager().getDefaultWorldGenerator(world.getName(), "");
|
ChunkGenerator cg = plugin.getAddonsManager().getDefaultWorldGenerator(world.getName(), "");
|
||||||
if (cg == null) {
|
if (cg == null) {
|
||||||
Flags.CLEAN_SUPER_FLAT.setSetting(world, false);
|
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;
|
return;
|
||||||
}
|
}
|
||||||
// Add to queue
|
// Add to queue
|
||||||
@ -96,7 +101,8 @@ public class CleanSuperFlatListener extends FlagListener {
|
|||||||
// Run populators
|
// Run populators
|
||||||
cg.getDefaultPopulators(world).forEach(pop -> pop.populate(world, random, e.getChunk()));
|
cg.getDefaultPopulators(world).forEach(pop -> pop.populate(world, random, e.getChunk()));
|
||||||
if (plugin.getSettings().isLogCleanSuperFlatChunks()) {
|
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 {
|
} else {
|
||||||
task.cancel();
|
task.cancel();
|
||||||
|
Loading…
Reference in New Issue
Block a user