Double bugfix - world, chunklist.
- World "world" may not even exist. - Chunklist may be zero, but that won't break here - Count all chunks in all enabled worlds.
This commit is contained in:
parent
9e199372b9
commit
263e143e6c
@ -1143,14 +1143,15 @@ command:
|
|||||||
msg = "disabled for world \"" + split[1] + "\"";
|
msg = "disabled for world \"" + split[1] + "\"";
|
||||||
break;
|
break;
|
||||||
case "stats":
|
case "stats":
|
||||||
World world = org.bukkit.Bukkit.getWorld("world");
|
long chunks = 0;
|
||||||
Chunk ChunkList[] = world.getLoadedChunks();
|
for (SedWorld sw: sedWorldList)
|
||||||
|
chunks += sw.world.getLoadedChunks().length;
|
||||||
msg = String.format("blocks: %d snowblocks: %d ticks: %d protect: %s\n" +
|
msg = String.format("blocks: %d snowblocks: %d ticks: %d protect: %s\n" +
|
||||||
"considered %d, displaced %d, degraded %d blocks in %d chunks %d errors\nlast one at %d %d %d\n" +
|
"considered %d, displaced %d, degraded %d blocks in %d chunks %d errors\nlast one at %d %d %d\n" +
|
||||||
"ignored: edge %d, type %d, storm %d, vegetation %d, resistance %d, water %d, wave %d, sand %d, hardness %d, " +
|
"ignored: edge %d, type %d, storm %d, vegetation %d, resistance %d, water %d, wave %d, sand %d, hardness %d, " +
|
||||||
"protected %d, locked in %d, rate %d",
|
"protected %d, locked in %d, rate %d",
|
||||||
conf_blocks, conf_snowblocks, conf_ticks, conf_protect ? "true" : "false",
|
conf_blocks, conf_snowblocks, conf_ticks, conf_protect ? "true" : "false",
|
||||||
stat_considered, stat_displaced, stat_degraded, ChunkList.length, stat_errors,
|
stat_considered, stat_displaced, stat_degraded, chunks, stat_errors,
|
||||||
stat_lastx, stat_lasty, stat_lastz,
|
stat_lastx, stat_lasty, stat_lastz,
|
||||||
stat_ignored_edge, stat_ignored_type, stat_ignored_storm, stat_ignored_vegetation,
|
stat_ignored_edge, stat_ignored_type, stat_ignored_storm, stat_ignored_vegetation,
|
||||||
stat_ignored_resistance, stat_ignored_water, stat_ignored_wave, stat_ignored_sand, stat_ignored_hardness,
|
stat_ignored_resistance, stat_ignored_water, stat_ignored_wave, stat_ignored_sand, stat_ignored_hardness,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user