Skip to content

Commit 037c6be

Browse files
committed
[ci skip] Fix chunkstats command typo
1 parent 8fb1211 commit 037c6be

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/main/java/catserver/server/command/internal/CommandChunkStats.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,14 +76,15 @@ public boolean execute(CommandSender sender, String commandLabel, String[] args)
7676

7777
sender.sendMessage("Chunks Time:");
7878
for (ChunkTime chunkTime : chunkList) {
79+
if (chunkTime.chunk == null) continue;
7980
int chunkX = chunkTime.chunk.x;
8081
int chunkZ = chunkTime.chunk.z;
8182
int posX = chunkX << 4;
8283
int posZ = chunkZ << 4;
8384
int time = (int) (chunkTime.time / 1000 / 1000);
8485
int avg = totalTick > 0 ? time / totalTick : 0;
8586

86-
TextComponent component = new TextComponent(String.format("[%s: %d,%d at chunk %d,%d] has running time: %d ms (Arg %d ms/tick)", chunkTime.chunk.world.getWorld().getName(), posX, posZ, chunkX, chunkZ, time, avg));
87+
TextComponent component = new TextComponent(String.format("[%s: %d,%d at chunk %d,%d] has running time: %d ms (Avg %d ms/tick)", chunkTime.chunk.world.getWorld().getName(), posX, posZ, chunkX, chunkZ, time, avg));
8788
component.setClickEvent(new ClickEvent(ClickEvent.Action.RUN_COMMAND, String.format("/minecraft:tp %d 128 %d", posX, posZ)));
8889
component.setHoverEvent(new HoverEvent(HoverEvent.Action.SHOW_TEXT, new TextComponent[]{new TextComponent(String.format("Execute command: /minecraft:tp %d 128 %d", posX, posZ))}));
8990
sender.spigot().sendMessage(component);

0 commit comments

Comments
 (0)