Skip to content

Commit

Permalink
Fixed ZPlayer#updateStat issue (2)
Browse files Browse the repository at this point in the history
  • Loading branch information
zerrium committed Nov 24, 2020
1 parent de2fad1 commit 2cad9a6
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/main/java/zerrium/ZPlayer.java
Original file line number Diff line number Diff line change
Expand Up @@ -199,6 +199,11 @@ public void run() {
if(Zstats.debug) System.out.println("EntityType substat done");

//server world save size
Zstats.end_size = 0L;
Zstats.nether_size = 0L;
Zstats.world_size = 0L;
Zstats.total_size = 0L;

Bukkit.getWorlds().forEach(i ->{
switch(i.getEnvironment()){
case NORMAL:
Expand All @@ -213,6 +218,9 @@ public void run() {
Zstats.end_size = FileUtils.sizeOfDirectory(i.getWorldFolder());
Zstats.total_size += Zstats.end_size;
break;
default:
Zstats.total_size += Zstats.total_size;
break;
}
if(Zstats.debug) System.out.println("Got world size of "+i.getName());
});
Expand Down

0 comments on commit 2cad9a6

Please sign in to comment.