aboutsummaryrefslogtreecommitdiffhomepage
path: root/patches/api/0011-Timings-v2.patch
diff options
context:
space:
mode:
Diffstat (limited to 'patches/api/0011-Timings-v2.patch')
-rw-r--r--patches/api/0011-Timings-v2.patch102
1 files changed, 70 insertions, 32 deletions
diff --git a/patches/api/0011-Timings-v2.patch b/patches/api/0011-Timings-v2.patch
index 88d4b7afed..928003f621 100644
--- a/patches/api/0011-Timings-v2.patch
+++ b/patches/api/0011-Timings-v2.patch
@@ -8,10 +8,10 @@ expose isRunning
diff --git a/src/main/java/co/aikar/timings/FullServerTickHandler.java b/src/main/java/co/aikar/timings/FullServerTickHandler.java
new file mode 100644
-index 0000000000000000000000000000000000000000..36b8fe86335df851f9c85d6bb2a91368b4d945d1
+index 0000000000000000000000000000000000000000..3e747abde6fefae90f1c15cb00158bc5303cbe50
--- /dev/null
+++ b/src/main/java/co/aikar/timings/FullServerTickHandler.java
-@@ -0,0 +1,86 @@
+@@ -0,0 +1,89 @@
+package co.aikar.timings;
+
+import static co.aikar.timings.TimingsManager.*;
@@ -19,6 +19,9 @@ index 0000000000000000000000000000000000000000..36b8fe86335df851f9c85d6bb2a91368
+import org.bukkit.Bukkit;
+import org.jetbrains.annotations.NotNull;
+
++/**
++ * @deprecated Timings will be removed in the future
++ */
+@Deprecated(forRemoval = true)
+public class FullServerTickHandler extends TimingHandler {
+ private static final TimingIdentifier IDENTITY = new TimingIdentifier("Minecraft", "Full Server Tick", null);
@@ -100,10 +103,10 @@ index 0000000000000000000000000000000000000000..36b8fe86335df851f9c85d6bb2a91368
+}
diff --git a/src/main/java/co/aikar/timings/NullTimingHandler.java b/src/main/java/co/aikar/timings/NullTimingHandler.java
new file mode 100644
-index 0000000000000000000000000000000000000000..81671cf40feeed2844ee8d92348d48062aaf2c46
+index 0000000000000000000000000000000000000000..42e7e712403676171d34d5f2be27e48e7a071ebd
--- /dev/null
+++ b/src/main/java/co/aikar/timings/NullTimingHandler.java
-@@ -0,0 +1,69 @@
+@@ -0,0 +1,72 @@
+/*
+ * This file is licensed under the MIT License (MIT).
+ *
@@ -132,6 +135,9 @@ index 0000000000000000000000000000000000000000..81671cf40feeed2844ee8d92348d4806
+import org.jetbrains.annotations.NotNull;
+import org.jetbrains.annotations.Nullable;
+
++/**
++ * @deprecated Timings will be removed in the future
++ */
+@Deprecated(forRemoval = true)
+public final class NullTimingHandler implements Timing {
+ public static final Timing NULL = new NullTimingHandler();
@@ -175,10 +181,10 @@ index 0000000000000000000000000000000000000000..81671cf40feeed2844ee8d92348d4806
+}
diff --git a/src/main/java/co/aikar/timings/TimedEventExecutor.java b/src/main/java/co/aikar/timings/TimedEventExecutor.java
new file mode 100644
-index 0000000000000000000000000000000000000000..be275c25664e0c76123371c6c8fac601f87fa492
+index 0000000000000000000000000000000000000000..a3ad690691eb5537a565d7ba684354acfec5ee2d
--- /dev/null
+++ b/src/main/java/co/aikar/timings/TimedEventExecutor.java
-@@ -0,0 +1,84 @@
+@@ -0,0 +1,87 @@
+/*
+ * This file is licensed under the MIT License (MIT).
+ *
@@ -215,6 +221,9 @@ index 0000000000000000000000000000000000000000..be275c25664e0c76123371c6c8fac601
+import org.jetbrains.annotations.NotNull;
+import org.jetbrains.annotations.Nullable;
+
++/**
++ * @deprecated Timings will be removed in the future
++ */
+@Deprecated(forRemoval = true)
+public class TimedEventExecutor implements EventExecutor {
+
@@ -265,7 +274,7 @@ index 0000000000000000000000000000000000000000..be275c25664e0c76123371c6c8fac601
+}
diff --git a/src/main/java/co/aikar/timings/Timing.java b/src/main/java/co/aikar/timings/Timing.java
new file mode 100644
-index 0000000000000000000000000000000000000000..7514fad26f955329f8bf17ff17db75f0c8301ee5
+index 0000000000000000000000000000000000000000..4195efcfe044618052bb03dea34a4fb2ca7c44f0
--- /dev/null
+++ b/src/main/java/co/aikar/timings/Timing.java
@@ -0,0 +1,86 @@
@@ -300,7 +309,7 @@ index 0000000000000000000000000000000000000000..7514fad26f955329f8bf17ff17db75f0
+/**
+ * Provides an ability to time sections of code within the Minecraft Server
+ *
-+ * @deprecated Timings will likely be replaced with Spark in the future
++ * @deprecated Timings will be removed in the future
+ */
+@Deprecated(forRemoval = true)
+public interface Timing extends AutoCloseable {
@@ -717,10 +726,10 @@ index 0000000000000000000000000000000000000000..199789d56d22fcb1b77ebd56805cc28a
+}
diff --git a/src/main/java/co/aikar/timings/TimingHistory.java b/src/main/java/co/aikar/timings/TimingHistory.java
new file mode 100644
-index 0000000000000000000000000000000000000000..065991e7a7f6119797ea315a56836ba17dd17d05
+index 0000000000000000000000000000000000000000..3d4390f263e52aafa24b306b1fd20d088a4ffcd7
--- /dev/null
+++ b/src/main/java/co/aikar/timings/TimingHistory.java
-@@ -0,0 +1,352 @@
+@@ -0,0 +1,357 @@
+/*
+ * This file is licensed under the MIT License (MIT).
+ *
@@ -773,6 +782,11 @@ index 0000000000000000000000000000000000000000..065991e7a7f6119797ea315a56836ba1
+import static co.aikar.timings.TimingsManager.MINUTE_REPORTS;
+import static co.aikar.util.JSONUtil.*;
+
++/**
++ * Internal.
++ *
++ * @deprecated Timings will be removed in the future
++ */
+@Deprecated(forRemoval = true)
+@SuppressWarnings({"deprecation", "SuppressionAnnotation", "Convert2Lambda", "Anonymous2MethodRef"})
+public class TimingHistory {
@@ -1261,7 +1275,7 @@ index 0000000000000000000000000000000000000000..df142a89b8c43acb81eb383eac0ef048
+}
diff --git a/src/main/java/co/aikar/timings/Timings.java b/src/main/java/co/aikar/timings/Timings.java
new file mode 100644
-index 0000000000000000000000000000000000000000..445b5d3b61f31cf263475d0155a7b0252c54a3f8
+index 0000000000000000000000000000000000000000..e81d0bc309de877ed2b5da6122f55c162e9b5f10
--- /dev/null
+++ b/src/main/java/co/aikar/timings/Timings.java
@@ -0,0 +1,331 @@
@@ -1308,7 +1322,7 @@ index 0000000000000000000000000000000000000000..445b5d3b61f31cf263475d0155a7b025
+import org.jetbrains.annotations.Nullable;
+
+/**
-+ * @deprecated Timings will likely be replaced with Spark in the future
++ * @deprecated Timings will be removed in the future
+ */
+@Deprecated(forRemoval = true)
+@SuppressWarnings({"UnusedDeclaration", "WeakerAccess", "SameParameterValue"})
@@ -1598,10 +1612,10 @@ index 0000000000000000000000000000000000000000..445b5d3b61f31cf263475d0155a7b025
+
diff --git a/src/main/java/co/aikar/timings/TimingsCommand.java b/src/main/java/co/aikar/timings/TimingsCommand.java
new file mode 100644
-index 0000000000000000000000000000000000000000..e801e79fa57c44b2e5d359647c920f88064826f1
+index 0000000000000000000000000000000000000000..95d87c9dbf2b237787294dfbe7fed87a36e6dedf
--- /dev/null
+++ b/src/main/java/co/aikar/timings/TimingsCommand.java
-@@ -0,0 +1,124 @@
+@@ -0,0 +1,126 @@
+/*
+ * This file is licensed under the MIT License (MIT).
+ *
@@ -1640,7 +1654,9 @@ index 0000000000000000000000000000000000000000..e801e79fa57c44b2e5d359647c920f88
+
+import static net.kyori.adventure.text.Component.text;
+
-+
++/**
++ * @deprecated Timings will be removed in the future
++ */
+@Deprecated(forRemoval = true)
+public class TimingsCommand extends BukkitCommand {
+ private static final List<String> TIMINGS_SUBCOMMANDS = ImmutableList.of("report", "reset", "on", "off", "paste", "verbon", "verboff");
@@ -1728,7 +1744,7 @@ index 0000000000000000000000000000000000000000..e801e79fa57c44b2e5d359647c920f88
+}
diff --git a/src/main/java/co/aikar/timings/TimingsManager.java b/src/main/java/co/aikar/timings/TimingsManager.java
new file mode 100644
-index 0000000000000000000000000000000000000000..5e1558ca3ffeeaf2645fa003965474a442d650bf
+index 0000000000000000000000000000000000000000..e72ad05abada04426e32a73d02b21cb69079d268
--- /dev/null
+++ b/src/main/java/co/aikar/timings/TimingsManager.java
@@ -0,0 +1,192 @@
@@ -1774,7 +1790,7 @@ index 0000000000000000000000000000000000000000..5e1558ca3ffeeaf2645fa003965474a4
+import org.jetbrains.annotations.Nullable;
+
+/**
-+ * @deprecated Timings will likely be replaced with Spark in the future
++ * @deprecated Timings will be removed in the future
+ */
+@Deprecated(forRemoval = true)
+public final class TimingsManager {
@@ -1926,10 +1942,10 @@ index 0000000000000000000000000000000000000000..5e1558ca3ffeeaf2645fa003965474a4
+}
diff --git a/src/main/java/co/aikar/timings/TimingsReportListener.java b/src/main/java/co/aikar/timings/TimingsReportListener.java
new file mode 100644
-index 0000000000000000000000000000000000000000..3af5b8ea795311582044c712de50d29412024b77
+index 0000000000000000000000000000000000000000..df066d6f8d55afbc0c1897c486d638657a5f8df9
--- /dev/null
+++ b/src/main/java/co/aikar/timings/TimingsReportListener.java
-@@ -0,0 +1,87 @@
+@@ -0,0 +1,90 @@
+package co.aikar.timings;
+
+import com.google.common.base.Preconditions;
@@ -1944,6 +1960,9 @@ index 0000000000000000000000000000000000000000..3af5b8ea795311582044c712de50d294
+
+import java.util.List;
+
++/**
++ * @deprecated Timings will be removed in the future
++ */
+@Deprecated(forRemoval = true)
+@SuppressWarnings("WeakerAccess")
+public class TimingsReportListener implements net.kyori.adventure.audience.ForwardingAudience, MessageCommandSender {
@@ -2888,40 +2907,48 @@ index fa6ad07214d5e38866bf6bee9139c6c938e9f51a..57c9b560c77a56588870598acb543469
* Sends the component to the player
*
diff --git a/src/main/java/org/bukkit/UnsafeValues.java b/src/main/java/org/bukkit/UnsafeValues.java
-index d8b346fe0f9634218954fe818d53272a0896af9c..7545e3489474aab3f935095c6057ea2eac1bf84b 100644
+index d8b346fe0f9634218954fe818d53272a0896af9c..12ef99f1c91b92a133611c5f5aeaaeebd02ce232 100644
--- a/src/main/java/org/bukkit/UnsafeValues.java
+++ b/src/main/java/org/bukkit/UnsafeValues.java
-@@ -40,6 +40,7 @@ public interface UnsafeValues {
+@@ -40,6 +40,11 @@ public interface UnsafeValues {
net.kyori.adventure.text.Component resolveWithContext(net.kyori.adventure.text.Component component, org.bukkit.command.CommandSender context, org.bukkit.entity.Entity scoreboardSubject, boolean bypassPermissions) throws java.io.IOException;
// Paper end
++ /**
++ * @deprecated Timings will be removed in the future
++ */
++ @Deprecated(forRemoval = true)
+ void reportTimings(); // Paper
Material toLegacy(Material material);
Material fromLegacy(Material material);
-@@ -151,4 +152,12 @@ public interface UnsafeValues {
+@@ -151,4 +156,12 @@ public interface UnsafeValues {
return !Bukkit.getUnsafe().isSupportedApiVersion(plugin.getDescription().getAPIVersion());
}
// Paper end
+
+ // Paper start
+ /**
-+ * Server name to report to timings v2
-+ * @return name
++ * @deprecated Timings will be removed in the future
+ */
++ @Deprecated(forRemoval = true)
+ String getTimingsServerName();
+ // Paper end
}
diff --git a/src/main/java/org/bukkit/command/BufferedCommandSender.java b/src/main/java/org/bukkit/command/BufferedCommandSender.java
new file mode 100644
-index 0000000000000000000000000000000000000000..f9a00aecca5ec41b460bf41dfe1c69694768cf98
+index 0000000000000000000000000000000000000000..45ed63797b13e114bf3795c80a6c3967d8eb2351
--- /dev/null
+++ b/src/main/java/org/bukkit/command/BufferedCommandSender.java
-@@ -0,0 +1,21 @@
+@@ -0,0 +1,25 @@
+package org.bukkit.command;
+
+import org.jetbrains.annotations.NotNull;
+
++/**
++ * @deprecated Timings will be removed in the future
++ */
++@Deprecated(forRemoval = true)
+public class BufferedCommandSender implements MessageCommandSender {
+ private final StringBuffer buffer = new StringBuffer();
+ @Override
@@ -2940,20 +2967,28 @@ index 0000000000000000000000000000000000000000..f9a00aecca5ec41b460bf41dfe1c6969
+ }
+}
diff --git a/src/main/java/org/bukkit/command/Command.java b/src/main/java/org/bukkit/command/Command.java
-index f3cdf13f22aa789ee8cc235b61fda4035b254219..33c0a60e71f4bd29966c10ea60b22f14e56c1de4 100644
+index f3cdf13f22aa789ee8cc235b61fda4035b254219..17d3da22e8fcdf73a587b17a0cdac3b23ded3567 100644
--- a/src/main/java/org/bukkit/command/Command.java
+++ b/src/main/java/org/bukkit/command/Command.java
-@@ -33,7 +33,8 @@ public abstract class Command {
+@@ -33,7 +33,16 @@ public abstract class Command {
protected String usageMessage;
private String permission;
private net.kyori.adventure.text.Component permissionMessage; // Paper
- public org.spigotmc.CustomTimingsHandler timings; // Spigot
++ /**
++ * @deprecated Timings will be removed in the future
++ */
++ @Deprecated(forRemoval = true)
+ public co.aikar.timings.Timing timings; // Paper
++ /**
++ * @deprecated Timings will be removed in the future
++ */
++ @Deprecated(forRemoval = true)
+ @NotNull public String getTimingName() {return getName();} // Paper
protected Command(@NotNull String name) {
this(name, "", "/" + name, new ArrayList<String>());
-@@ -47,7 +48,6 @@ public abstract class Command {
+@@ -47,7 +56,6 @@ public abstract class Command {
this.usageMessage = (usageMessage == null) ? "/" + name : usageMessage;
this.aliases = aliases;
this.activeAliases = new ArrayList<String>(aliases);
@@ -2961,7 +2996,7 @@ index f3cdf13f22aa789ee8cc235b61fda4035b254219..33c0a60e71f4bd29966c10ea60b22f14
}
/**
-@@ -245,7 +245,6 @@ public abstract class Command {
+@@ -245,7 +253,6 @@ public abstract class Command {
}
this.nextLabel = name;
if (!isRegistered()) {
@@ -2994,10 +3029,10 @@ index d6c8938b1e13b63116b7b0e074ea8ef5997f8dc3..a6ad94ef98a1df1d2842635d850bc990
}
diff --git a/src/main/java/org/bukkit/command/MessageCommandSender.java b/src/main/java/org/bukkit/command/MessageCommandSender.java
new file mode 100644
-index 0000000000000000000000000000000000000000..9d263ab3afb938c215c0b64d9171345fca6ceb2c
+index 0000000000000000000000000000000000000000..946d2f0ef37c6cf895caf8d3c6963c7889e0567b
--- /dev/null
+++ b/src/main/java/org/bukkit/command/MessageCommandSender.java
-@@ -0,0 +1,135 @@
+@@ -0,0 +1,138 @@
+package org.bukkit.command;
+
+import org.bukkit.Bukkit;
@@ -3015,7 +3050,10 @@ index 0000000000000000000000000000000000000000..9d263ab3afb938c215c0b64d9171345f
+
+/**
+ * For when all you care about is just messaging
++ *
++ * @deprecated Timings will be removed in the future
+ */
++@Deprecated(forRemoval = true)
+public interface MessageCommandSender extends CommandSender {
+
+ @Override