mirror of
https://github.com/PaperMC/Paper.git
synced 2025-01-20 23:46:57 +01:00
ea0ec8c5a0
Upstream has released updates that appear to apply and compile correctly. This update has not been tested by PaperMC and as with ANY update, please do your own testing Bukkit Changes: e9ce88b9 SPIGOT-6562: Add more specific sculk sensor event CraftBukkit Changes: d7ef1e91 SPIGOT-6558: Attempt to improve SkullMeta e7a63287 SPIGOT-6562: Add more specific sculk sensor event
40 lines
2 KiB
Diff
40 lines
2 KiB
Diff
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
|
From: Tom <cryptite@gmail.com>
|
|
Date: Fri, 26 Feb 2021 16:10:53 -0600
|
|
Subject: [PATCH] Clear SyncLoadInfo
|
|
|
|
This patch merely adds the extra argument "clear" after /paper syncloadinfo to clear currently stored syncload info.
|
|
|
|
diff --git a/src/main/java/com/destroystokyo/paper/PaperCommand.java b/src/main/java/com/destroystokyo/paper/PaperCommand.java
|
|
index 8fdfcf001cf2ed6184d86ee033ede08fdf9aa5d6..ce332be5449d3129356e55841cc319b3d35adde4 100644
|
|
--- a/src/main/java/com/destroystokyo/paper/PaperCommand.java
|
|
+++ b/src/main/java/com/destroystokyo/paper/PaperCommand.java
|
|
@@ -205,6 +205,13 @@ public class PaperCommand extends Command {
|
|
sender.sendMessage(ChatColor.RED + "This command requires the server startup flag '-Dpaper.debug-sync-loads=true' to be set.");
|
|
return;
|
|
}
|
|
+
|
|
+ if (args.length > 1 && args[1].equals("clear")) {
|
|
+ SyncLoadFinder.clear();
|
|
+ sender.sendMessage(ChatColor.GRAY + "Sync load data cleared.");
|
|
+ return;
|
|
+ }
|
|
+
|
|
File file = new File(new File(new File("."), "debug"),
|
|
"sync-load-info" + DateTimeFormatter.ofPattern("yyyy-MM-dd_HH.mm.ss").format(LocalDateTime.now()) + ".txt");
|
|
file.getParentFile().mkdirs();
|
|
diff --git a/src/main/java/com/destroystokyo/paper/io/SyncLoadFinder.java b/src/main/java/com/destroystokyo/paper/io/SyncLoadFinder.java
|
|
index 524f33371b9de1d4dd6972fe59ffbe1804d7c5f3..0bb4aaa546939b67a5d22865190f30478a9337c1 100644
|
|
--- a/src/main/java/com/destroystokyo/paper/io/SyncLoadFinder.java
|
|
+++ b/src/main/java/com/destroystokyo/paper/io/SyncLoadFinder.java
|
|
@@ -26,6 +26,10 @@ public class SyncLoadFinder {
|
|
public final Long2IntOpenHashMap coordinateTimes = new Long2IntOpenHashMap();
|
|
}
|
|
|
|
+ public static void clear() {
|
|
+ SYNC_LOADS.clear();
|
|
+ }
|
|
+
|
|
public static void logSyncLoad(final Level world, final int chunkX, final int chunkZ) {
|
|
if (!ENABLED) {
|
|
return;
|