mirror of
https://github.com/PaperMC/Paper.git
synced 2025-02-17 02:34:30 +01:00
Add summary to /paper chunkinfo command
This commit is contained in:
parent
427a4c9dd8
commit
c53e8d6220
1 changed files with 18 additions and 0 deletions
|
@ -107,6 +107,12 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
|||
+ }
|
||||
+ }
|
||||
+
|
||||
+ int accumulatedTotal = 0;
|
||||
+ int accumulatedInactive = 0;
|
||||
+ int accumulatedBorder = 0;
|
||||
+ int accumulatedTicking = 0;
|
||||
+ int accumulatedEntityTicking = 0;
|
||||
+
|
||||
+ for (org.bukkit.World bukkitWorld : worlds) {
|
||||
+ WorldServer world = ((CraftWorld)bukkitWorld).getHandle();
|
||||
+
|
||||
|
@ -141,11 +147,23 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
|||
+ }
|
||||
+ }
|
||||
+
|
||||
+ accumulatedTotal += total;
|
||||
+ accumulatedInactive += inactive;
|
||||
+ accumulatedBorder += border;
|
||||
+ accumulatedTicking += ticking;
|
||||
+ accumulatedEntityTicking += entityTicking;
|
||||
+
|
||||
+ sender.sendMessage(ChatColor.BLUE + "Chunks in " + ChatColor.GREEN + bukkitWorld.getName() + ChatColor.DARK_AQUA + ":");
|
||||
+ sender.sendMessage(ChatColor.BLUE + "Total: " + ChatColor.DARK_AQUA + total + ChatColor.BLUE + " Inactive: " + ChatColor.DARK_AQUA
|
||||
+ + inactive + ChatColor.BLUE + " Border: " + ChatColor.DARK_AQUA + border + ChatColor.BLUE + " Ticking: "
|
||||
+ + ChatColor.DARK_AQUA + ticking + ChatColor.BLUE + " Entity: " + ChatColor.DARK_AQUA + entityTicking);
|
||||
+ }
|
||||
+ if (worlds.size() > 1) {
|
||||
+ sender.sendMessage(ChatColor.BLUE + "Chunks in " + ChatColor.GREEN + "all listed worlds" + ChatColor.DARK_AQUA + ":");
|
||||
+ sender.sendMessage(ChatColor.BLUE + "Total: " + ChatColor.DARK_AQUA + accumulatedTotal + ChatColor.BLUE + " Inactive: " + ChatColor.DARK_AQUA
|
||||
+ + accumulatedInactive + ChatColor.BLUE + " Border: " + ChatColor.DARK_AQUA + accumulatedBorder + ChatColor.BLUE + " Ticking: "
|
||||
+ + ChatColor.DARK_AQUA + accumulatedTicking + ChatColor.BLUE + " Entity: " + ChatColor.DARK_AQUA + accumulatedEntityTicking);
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
+ private void doDebug(CommandSender sender, String[] args) {
|
||||
|
|
Loading…
Add table
Reference in a new issue