Deprecate more Timings things for removal (#11126)

This commit is contained in:
Riley Park 2024-07-20 19:40:41 -07:00
parent 1ef619aa34
commit e09fea294f
2 changed files with 45 additions and 7 deletions

View file

@ -316,8 +316,8 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
--- a/src/main/java/org/bukkit/UnsafeValues.java --- a/src/main/java/org/bukkit/UnsafeValues.java
+++ b/src/main/java/org/bukkit/UnsafeValues.java +++ b/src/main/java/org/bukkit/UnsafeValues.java
@@ -0,0 +0,0 @@ public interface UnsafeValues { @@ -0,0 +0,0 @@ public interface UnsafeValues {
* @return name
*/ */
@Deprecated(forRemoval = true)
String getTimingsServerName(); String getTimingsServerName();
+ +
+ /** + /**

View file

@ -19,6 +19,9 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
+import org.bukkit.Bukkit; +import org.bukkit.Bukkit;
+import org.jetbrains.annotations.NotNull; +import org.jetbrains.annotations.NotNull;
+ +
+/**
+ * @deprecated Timings will be removed in the future
+ */
+@Deprecated(forRemoval = true) +@Deprecated(forRemoval = true)
+public class FullServerTickHandler extends TimingHandler { +public class FullServerTickHandler extends TimingHandler {
+ private static final TimingIdentifier IDENTITY = new TimingIdentifier("Minecraft", "Full Server Tick", null); + private static final TimingIdentifier IDENTITY = new TimingIdentifier("Minecraft", "Full Server Tick", null);
@ -132,6 +135,9 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
+import org.jetbrains.annotations.NotNull; +import org.jetbrains.annotations.NotNull;
+import org.jetbrains.annotations.Nullable; +import org.jetbrains.annotations.Nullable;
+ +
+/**
+ * @deprecated Timings will be removed in the future
+ */
+@Deprecated(forRemoval = true) +@Deprecated(forRemoval = true)
+public final class NullTimingHandler implements Timing { +public final class NullTimingHandler implements Timing {
+ public static final Timing NULL = new NullTimingHandler(); + public static final Timing NULL = new NullTimingHandler();
@ -215,6 +221,9 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
+import org.jetbrains.annotations.NotNull; +import org.jetbrains.annotations.NotNull;
+import org.jetbrains.annotations.Nullable; +import org.jetbrains.annotations.Nullable;
+ +
+/**
+ * @deprecated Timings will be removed in the future
+ */
+@Deprecated(forRemoval = true) +@Deprecated(forRemoval = true)
+public class TimedEventExecutor implements EventExecutor { +public class TimedEventExecutor implements EventExecutor {
+ +
@ -300,7 +309,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
+/** +/**
+ * Provides an ability to time sections of code within the Minecraft Server + * 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) +@Deprecated(forRemoval = true)
+public interface Timing extends AutoCloseable { +public interface Timing extends AutoCloseable {
@ -773,6 +782,11 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
+import static co.aikar.timings.TimingsManager.MINUTE_REPORTS; +import static co.aikar.timings.TimingsManager.MINUTE_REPORTS;
+import static co.aikar.util.JSONUtil.*; +import static co.aikar.util.JSONUtil.*;
+ +
+/**
+ * Internal.
+ *
+ * @deprecated Timings will be removed in the future
+ */
+@Deprecated(forRemoval = true) +@Deprecated(forRemoval = true)
+@SuppressWarnings({"deprecation", "SuppressionAnnotation", "Convert2Lambda", "Anonymous2MethodRef"}) +@SuppressWarnings({"deprecation", "SuppressionAnnotation", "Convert2Lambda", "Anonymous2MethodRef"})
+public class TimingHistory { +public class TimingHistory {
@ -1308,7 +1322,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
+import org.jetbrains.annotations.Nullable; +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) +@Deprecated(forRemoval = true)
+@SuppressWarnings({"UnusedDeclaration", "WeakerAccess", "SameParameterValue"}) +@SuppressWarnings({"UnusedDeclaration", "WeakerAccess", "SameParameterValue"})
@ -1640,7 +1654,9 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
+ +
+import static net.kyori.adventure.text.Component.text; +import static net.kyori.adventure.text.Component.text;
+ +
+ +/**
+ * @deprecated Timings will be removed in the future
+ */
+@Deprecated(forRemoval = true) +@Deprecated(forRemoval = true)
+public class TimingsCommand extends BukkitCommand { +public class TimingsCommand extends BukkitCommand {
+ private static final List<String> TIMINGS_SUBCOMMANDS = ImmutableList.of("report", "reset", "on", "off", "paste", "verbon", "verboff"); + private static final List<String> TIMINGS_SUBCOMMANDS = ImmutableList.of("report", "reset", "on", "off", "paste", "verbon", "verboff");
@ -1774,7 +1790,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
+import org.jetbrains.annotations.Nullable; +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) +@Deprecated(forRemoval = true)
+public final class TimingsManager { +public final class TimingsManager {
@ -1944,6 +1960,9 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
+ +
+import java.util.List; +import java.util.List;
+ +
+/**
+ * @deprecated Timings will be removed in the future
+ */
+@Deprecated(forRemoval = true) +@Deprecated(forRemoval = true)
+@SuppressWarnings("WeakerAccess") +@SuppressWarnings("WeakerAccess")
+public class TimingsReportListener implements net.kyori.adventure.audience.ForwardingAudience, MessageCommandSender { +public class TimingsReportListener implements net.kyori.adventure.audience.ForwardingAudience, MessageCommandSender {
@ -2895,6 +2914,10 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
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; 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 // Paper end
+ /**
+ * @deprecated Timings will be removed in the future
+ */
+ @Deprecated(forRemoval = true)
+ void reportTimings(); // Paper + void reportTimings(); // Paper
Material toLegacy(Material material); Material toLegacy(Material material);
@ -2906,9 +2929,9 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
+ +
+ // Paper start + // Paper start
+ /** + /**
+ * Server name to report to timings v2 + * @deprecated Timings will be removed in the future
+ * @return name
+ */ + */
+ @Deprecated(forRemoval = true)
+ String getTimingsServerName(); + String getTimingsServerName();
+ // Paper end + // Paper end
} }
@ -2922,6 +2945,10 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
+ +
+import org.jetbrains.annotations.NotNull; +import org.jetbrains.annotations.NotNull;
+ +
+/**
+ * @deprecated Timings will be removed in the future
+ */
+@Deprecated(forRemoval = true)
+public class BufferedCommandSender implements MessageCommandSender { +public class BufferedCommandSender implements MessageCommandSender {
+ private final StringBuffer buffer = new StringBuffer(); + private final StringBuffer buffer = new StringBuffer();
+ @Override + @Override
@ -2948,7 +2975,15 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
private String permission; private String permission;
private net.kyori.adventure.text.Component permissionMessage; // Paper private net.kyori.adventure.text.Component permissionMessage; // Paper
- public org.spigotmc.CustomTimingsHandler timings; // Spigot - public org.spigotmc.CustomTimingsHandler timings; // Spigot
+ /**
+ * @deprecated Timings will be removed in the future
+ */
+ @Deprecated(forRemoval = true)
+ public co.aikar.timings.Timing timings; // Paper + 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 + @NotNull public String getTimingName() {return getName();} // Paper
protected Command(@NotNull String name) { protected Command(@NotNull String name) {
@ -3015,7 +3050,10 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
+ +
+/** +/**
+ * For when all you care about is just messaging + * 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 { +public interface MessageCommandSender extends CommandSender {
+ +
+ @Override + @Override