mirror of
https://github.com/PaperMC/Folia.git
synced 2025-02-19 01:51:59 +01:00
Most significant changes are to portal/teleport logic, there may be some bugs there. Not really concerned about the passenger teleport, as Folia had already added support for that. Not sure how the spark changes are going to work.
54 lines
2.7 KiB
Diff
54 lines
2.7 KiB
Diff
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
|
From: Spottedleaf <Spottedleaf@users.noreply.github.com>
|
|
Date: Thu, 23 Feb 2023 20:12:48 -0800
|
|
Subject: [PATCH] Force disable timings
|
|
|
|
Need a new profiler system with region threading
|
|
|
|
diff --git a/src/main/java/co/aikar/timings/Timings.java b/src/main/java/co/aikar/timings/Timings.java
|
|
index e81d0bc309de877ed2b5da6122f55c162e9b5f10..7760c779e97a0e95d5c3d255b25d949ac20df235 100644
|
|
--- a/src/main/java/co/aikar/timings/Timings.java
|
|
+++ b/src/main/java/co/aikar/timings/Timings.java
|
|
@@ -145,13 +145,14 @@ public final class Timings {
|
|
* @param enabled Should timings be reported
|
|
*/
|
|
public static void setTimingsEnabled(boolean enabled) {
|
|
+ enabled = false; // Folia - region threading - disable timings
|
|
timingsEnabled = enabled;
|
|
warnAboutDeprecationOnEnable();
|
|
reset();
|
|
}
|
|
|
|
private static void warnAboutDeprecationOnEnable() {
|
|
- if (timingsEnabled && !warnedAboutDeprecationOnEnable) {
|
|
+ if ((true || timingsEnabled) && !warnedAboutDeprecationOnEnable) { // Folia
|
|
Bukkit.getLogger().warning(PlainTextComponentSerializer.plainText().serialize(deprecationMessage()));
|
|
warnedAboutDeprecationOnEnable = true;
|
|
}
|
|
@@ -159,8 +160,8 @@ public final class Timings {
|
|
|
|
public static Component deprecationMessage() {
|
|
return Component.text()
|
|
- .color(TextColor.color(0xffc93a))
|
|
- .append(Component.text("[!] The timings profiler has been enabled but has been scheduled for removal from Paper in the future."))
|
|
+ .color(TextColor.color(0xf39195)) // Folia
|
|
+ .append(Component.text("[!] The timings system cannot be enabled on Folia, and has been scheduled for removal from Paper in the future.")) // Folia
|
|
.append(Component.newline())
|
|
.append(Component.text(" We recommend migrating to the spark profiler."))
|
|
.append(Component.newline())
|
|
diff --git a/src/main/java/co/aikar/timings/TimingsCommand.java b/src/main/java/co/aikar/timings/TimingsCommand.java
|
|
index 95d87c9dbf2b237787294dfbe7fed87a36e6dedf..b83e5ff7ada8771fdf27ba9807c77ba6a4ce12da 100644
|
|
--- a/src/main/java/co/aikar/timings/TimingsCommand.java
|
|
+++ b/src/main/java/co/aikar/timings/TimingsCommand.java
|
|
@@ -56,8 +56,9 @@ public class TimingsCommand extends BukkitCommand {
|
|
if (!testPermission(sender)) {
|
|
return true;
|
|
}
|
|
- if (false) {
|
|
+ if (true) {
|
|
sender.sendMessage(Timings.deprecationMessage());
|
|
+ return true;
|
|
}
|
|
if (args.length < 1) {
|
|
sender.sendMessage(text("Usage: " + this.usageMessage, NamedTextColor.RED));
|