9
0
mirror of https://github.com/Winds-Studio/Leaf.git synced 2025-12-19 15:09:25 +00:00

Fix plugin compatibility

This commit is contained in:
Dreeam
2025-05-13 20:38:35 -04:00
parent 7691e546c2
commit 8f09a8cc43

View File

@@ -3046,59 +3046,31 @@ index 2fae50a9d1f0d9ecd91036697dedd64bc56f7d3b..bf299cfe88c383d489de0c36fd9a4922
return ret;
}
diff --git a/src/main/java/org/spigotmc/CustomTimingsHandler.java b/src/main/java/org/spigotmc/CustomTimingsHandler.java
deleted file mode 100644
index 5fbacfcf108432c5187aa9a4092d00d7d5b0fd53..0000000000000000000000000000000000000000
index 5fbacfcf108432c5187aa9a4092d00d7d5b0fd53..735e8f8591fec1d7108ac020cb2ddcf99577bce1 100644
--- a/src/main/java/org/spigotmc/CustomTimingsHandler.java
+++ /dev/null
@@ -1,67 +0,0 @@
-/*
- * This file is licensed under the MIT License (MIT).
- *
- * Copyright (c) 2014 Daniel Ennis <http://aikar.co>
- *
- * Permission is hereby granted, free of charge, to any person obtaining a copy
- * of this software and associated documentation files (the "Software"), to deal
- * in the Software without restriction, including without limitation the rights
- * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
- * copies of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in
- * all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
- * THE SOFTWARE.
- */
-package org.spigotmc;
-
-import org.bukkit.Bukkit;
-import org.jetbrains.annotations.NotNull;
-import org.bukkit.plugin.AuthorNagException;
+++ b/src/main/java/org/spigotmc/CustomTimingsHandler.java
@@ -26,9 +26,6 @@ package org.spigotmc;
import org.bukkit.Bukkit;
import org.jetbrains.annotations.NotNull;
import org.bukkit.plugin.AuthorNagException;
-import co.aikar.timings.Timing;
-import co.aikar.timings.Timings;
-import co.aikar.timings.TimingsManager;
-
-import java.lang.reflect.Method;
-import java.util.logging.Level;
-
-/**
- * This is here for legacy purposes incase any plugin used it.
- *
- * If you use this, migrate ASAP as this will be removed in the future!
- *
- * @deprecated
import java.lang.reflect.Method;
import java.util.logging.Level;
@@ -39,29 +36,16 @@ import java.util.logging.Level;
* If you use this, migrate ASAP as this will be removed in the future!
*
* @deprecated
- * @see co.aikar.timings.Timings#of
- */
-@Deprecated(forRemoval = true)
-public final class CustomTimingsHandler {
*/
+// Leaf start - Remove Timings
@Deprecated(forRemoval = true)
public final class CustomTimingsHandler {
- private final Timing handler;
-
- public CustomTimingsHandler(@NotNull String name) {
public CustomTimingsHandler(@NotNull String name) {
- Timing timing;
-
- new AuthorNagException("Deprecated use of CustomTimingsHandler. Timings has been removed.").printStackTrace();
@@ -3112,12 +3084,15 @@ index 5fbacfcf108432c5187aa9a4092d00d7d5b0fd53..00000000000000000000000000000000
- timing = Timings.NULL_HANDLER;
- }
- handler = timing;
- }
-
}
- public void startTiming() { handler.startTiming(); }
- public void stopTiming() { handler.stopTiming(); }
-
-}
+ public void startTiming() {}
+ public void stopTiming() {}
+ // Leaf end - Remove Timings
}
diff --git a/src/test/java/org/bukkit/AnnotationTest.java b/src/test/java/org/bukkit/AnnotationTest.java
index 37feafd626aaa17aba888d7ff13728b3c6f26d4d..e42619418c1a3e3dac22e7310bb9d64b42b9f6a7 100644
--- a/src/test/java/org/bukkit/AnnotationTest.java