mirror of
https://github.com/BX-Team/DivineMC.git
synced 2025-12-19 14:59:25 +00:00
finish api patches
This commit is contained in:
@@ -22,3 +22,19 @@
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -166,6 +_,15 @@
|
||||
pomProps.get().asFile.writeText("version=$projectVersion")
|
||||
}
|
||||
}
|
||||
+
|
||||
+// DivineMC start - Hide unnecessary compilation warnings
|
||||
+tasks.withType<JavaCompile> {
|
||||
+ val compilerArgs = options.compilerArgs
|
||||
+ compilerArgs.add("-Xlint:-module")
|
||||
+ compilerArgs.add("-Xlint:-removal")
|
||||
+ compilerArgs.add("-Xlint:-dep-ann")
|
||||
+}
|
||||
+// DivineMC end - Hide unnecessary compilation warnings
|
||||
|
||||
tasks.jar {
|
||||
from(generateApiVersioningFile.map { it.outputs.files.singleFile }) {
|
||||
|
||||
@@ -1,26 +1,24 @@
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: NONPLAYT <76615486+NONPLAYT@users.noreply.github.com>
|
||||
Date: Mon, 12 Jun 2023 00:23:38 +0300
|
||||
Date: Sat, 11 Jan 2025 23:50:00 +0300
|
||||
Subject: [PATCH] Disable reload command by default
|
||||
|
||||
This is fully rewritten reload command, you can enable or disable it with -DDivineMC.EnableReloadCommand flag
|
||||
Read this article why reload is VERY UNSAFE in Bukkit: https://madelinemiller.dev/blog/problem-with-reload/
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/command/defaults/ReloadCommand.java b/src/main/java/org/bukkit/command/defaults/ReloadCommand.java
|
||||
index bdfe68b386b5ca2878475e548d3c9a3808fce848..0a21f2138969f75425b720487e626aac796821d1 100644
|
||||
index bdfe68b386b5ca2878475e548d3c9a3808fce848..55387ddbf5734b3a860f129789b9ce95f0a69618 100644
|
||||
--- a/src/main/java/org/bukkit/command/defaults/ReloadCommand.java
|
||||
+++ b/src/main/java/org/bukkit/command/defaults/ReloadCommand.java
|
||||
@@ -1,8 +1,7 @@
|
||||
@@ -1,7 +1,5 @@
|
||||
package org.bukkit.command.defaults;
|
||||
|
||||
-import java.util.Arrays;
|
||||
-import java.util.Collections;
|
||||
import java.util.List;
|
||||
+
|
||||
import org.bukkit.Bukkit;
|
||||
import org.bukkit.ChatColor;
|
||||
import org.bukkit.command.Command;
|
||||
@@ -15,7 +14,7 @@ public class ReloadCommand extends BukkitCommand {
|
||||
@@ -15,7 +13,7 @@ public class ReloadCommand extends BukkitCommand {
|
||||
this.description = "Reloads the server configuration and plugins";
|
||||
this.usageMessage = "/reload [permissions|commands|confirm]"; // Paper
|
||||
this.setPermission("bukkit.command.reload");
|
||||
@@ -29,7 +27,7 @@ index bdfe68b386b5ca2878475e548d3c9a3808fce848..0a21f2138969f75425b720487e626aac
|
||||
}
|
||||
|
||||
@org.jetbrains.annotations.ApiStatus.Internal // Paper
|
||||
@@ -25,48 +24,53 @@ public class ReloadCommand extends BukkitCommand {
|
||||
@@ -25,47 +23,50 @@ public class ReloadCommand extends BukkitCommand {
|
||||
public boolean execute(@NotNull CommandSender sender, @NotNull String currentAlias, @NotNull String[] args) { // Paper
|
||||
if (!testPermission(sender)) return true;
|
||||
|
||||
@@ -45,7 +43,7 @@ index bdfe68b386b5ca2878475e548d3c9a3808fce848..0a21f2138969f75425b720487e626aac
|
||||
- Command.broadcastCommandMessage(sender, net.kyori.adventure.text.Component.text("Command aliases successfully reloaded.", net.kyori.adventure.text.format.NamedTextColor.GREEN));
|
||||
+ // DivineMC start - disable reload command by default & add startup flag
|
||||
+ if (System.getProperty("DivineMC.EnableReloadCommand") == null || false) {
|
||||
+ sender.sendMessage(net.kyori.adventure.text.Component.text("Operation denied, command disabled.", net.kyori.adventure.text.format.NamedTextColor.RED ));
|
||||
+ sender.sendMessage(net.kyori.adventure.text.Component.text("Operation denied, command disabled.", net.kyori.adventure.text.format.NamedTextColor.RED));
|
||||
+ sender.sendMessage(net.kyori.adventure.text.Component.text("Reload command SHOULD NEVER be used in whatever circumstances.", net.kyori.adventure.text.format.NamedTextColor.YELLOW));
|
||||
+ sender.sendMessage(net.kyori.adventure.text.Component.text("DivineMC has intentionally disabled it in order to stop you using it, instead of restarting your server.", net.kyori.adventure.text.format.NamedTextColor.YELLOW));
|
||||
+ sender.sendMessage(net.kyori.adventure.text.Component.text("If you still want to enable reload command, add -DDivineMC.EnableReloadCommand=true flag to your startup arguments.", net.kyori.adventure.text.format.NamedTextColor.YELLOW));
|
||||
@@ -83,7 +81,7 @@ index bdfe68b386b5ca2878475e548d3c9a3808fce848..0a21f2138969f75425b720487e626aac
|
||||
- return true;
|
||||
- }
|
||||
- // Paper end
|
||||
|
||||
-
|
||||
- Command.broadcastCommandMessage(sender, ChatColor.RED + "Please note that this command is not supported and may cause issues when using some plugins.");
|
||||
- Command.broadcastCommandMessage(sender, ChatColor.RED + "If you encounter any issues please use the /stop command to restart your server.");
|
||||
- // Paper start - lifecycle events
|
||||
@@ -104,16 +102,15 @@ index bdfe68b386b5ca2878475e548d3c9a3808fce848..0a21f2138969f75425b720487e626aac
|
||||
+ return true;
|
||||
+ }
|
||||
}
|
||||
+ // Paper end - lifecycle events
|
||||
+ Command.broadcastCommandMessage(sender, ChatColor.GREEN + "Reload complete.");
|
||||
+
|
||||
+ return true;
|
||||
}
|
||||
- }
|
||||
- // Paper end - lifecycle events
|
||||
- Command.broadcastCommandMessage(sender, ChatColor.GREEN + "Reload complete.");
|
||||
+ // Paper end - lifecycle events
|
||||
+ Command.broadcastCommandMessage(sender, ChatColor.GREEN + "Reload complete.");
|
||||
|
||||
return true;
|
||||
+ return true;
|
||||
+ }
|
||||
+ // DivineMC end
|
||||
return true;
|
||||
}
|
||||
|
||||
@NotNull
|
||||
@@ -1,6 +1,6 @@
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: NONPLAYT <76615486+NONPLAYT@users.noreply.github.com>
|
||||
Date: Sun, 12 May 2024 20:24:24 +0300
|
||||
Date: Sat, 11 Jan 2025 23:57:34 +0300
|
||||
Subject: [PATCH] Delete Timings
|
||||
|
||||
|
||||
@@ -179,7 +179,7 @@ index 42e7e712403676171d34d5f2be27e48e7a071ebd..00000000000000000000000000000000
|
||||
-}
|
||||
diff --git a/src/main/java/co/aikar/timings/TimedEventExecutor.java b/src/main/java/co/aikar/timings/TimedEventExecutor.java
|
||||
deleted file mode 100644
|
||||
index 438a9c76381ea3f5b774e2232ff56c5dc6f82586..0000000000000000000000000000000000000000
|
||||
index 157617933a772451f6c073d97afaf305769b4d40..0000000000000000000000000000000000000000
|
||||
--- a/src/main/java/co/aikar/timings/TimedEventExecutor.java
|
||||
+++ /dev/null
|
||||
@@ -1,93 +0,0 @@
|
||||
@@ -265,9 +265,9 @@ index 438a9c76381ea3f5b774e2232ff56c5dc6f82586..00000000000000000000000000000000
|
||||
- executor.execute(listener, event);
|
||||
- return;
|
||||
- }
|
||||
- //try (Timing ignored = timings.startTiming()){ // Purpur
|
||||
- try (Timing ignored = timings.startTiming()){
|
||||
- executor.execute(listener, event);
|
||||
- //} // Purpur
|
||||
- }
|
||||
- }
|
||||
-
|
||||
- @Override
|
||||
@@ -278,10 +278,10 @@ index 438a9c76381ea3f5b774e2232ff56c5dc6f82586..00000000000000000000000000000000
|
||||
-}
|
||||
diff --git a/src/main/java/co/aikar/timings/Timing.java b/src/main/java/co/aikar/timings/Timing.java
|
||||
deleted file mode 100644
|
||||
index 8709c955bac34bc546a8e022cfac808bc61ee793..0000000000000000000000000000000000000000
|
||||
index 4195efcfe044618052bb03dea34a4fb2ca7c44f0..0000000000000000000000000000000000000000
|
||||
--- a/src/main/java/co/aikar/timings/Timing.java
|
||||
+++ /dev/null
|
||||
@@ -1,92 +0,0 @@
|
||||
@@ -1,86 +0,0 @@
|
||||
-/*
|
||||
- * This file is licensed under the MIT License (MIT).
|
||||
- *
|
||||
@@ -323,7 +323,6 @@ index 8709c955bac34bc546a8e022cfac808bc61ee793..00000000000000000000000000000000
|
||||
- * @return Timing
|
||||
- */
|
||||
- @NotNull
|
||||
- @io.papermc.paper.annotation.DoNotUse // Purpur
|
||||
- Timing startTiming();
|
||||
-
|
||||
- /**
|
||||
@@ -331,7 +330,6 @@ index 8709c955bac34bc546a8e022cfac808bc61ee793..00000000000000000000000000000000
|
||||
- *
|
||||
- * Will automatically be called when this Timing is used with try-with-resources
|
||||
- */
|
||||
- @io.papermc.paper.annotation.DoNotUse // Purpur
|
||||
- void stopTiming();
|
||||
-
|
||||
- /**
|
||||
@@ -342,7 +340,6 @@ index 8709c955bac34bc546a8e022cfac808bc61ee793..00000000000000000000000000000000
|
||||
- * @return Timing
|
||||
- */
|
||||
- @NotNull
|
||||
- @io.papermc.paper.annotation.DoNotUse // Purpur
|
||||
- Timing startTimingIfSync();
|
||||
-
|
||||
- /**
|
||||
@@ -352,14 +349,12 @@ index 8709c955bac34bc546a8e022cfac808bc61ee793..00000000000000000000000000000000
|
||||
- *
|
||||
- * But only if we are on the primary thread.
|
||||
- */
|
||||
- @io.papermc.paper.annotation.DoNotUse // Purpur
|
||||
- void stopTimingIfSync();
|
||||
-
|
||||
- /**
|
||||
- * @deprecated Doesn't do anything - Removed
|
||||
- */
|
||||
- @Deprecated
|
||||
- @io.papermc.paper.annotation.DoNotUse // Purpur
|
||||
- void abort();
|
||||
-
|
||||
- /**
|
||||
@@ -371,7 +366,6 @@ index 8709c955bac34bc546a8e022cfac808bc61ee793..00000000000000000000000000000000
|
||||
- TimingHandler getTimingHandler();
|
||||
-
|
||||
- @Override
|
||||
- @io.papermc.paper.annotation.DoNotUse // Purpur
|
||||
- void close();
|
||||
-}
|
||||
diff --git a/src/main/java/co/aikar/timings/TimingData.java b/src/main/java/co/aikar/timings/TimingData.java
|
||||
@@ -1285,7 +1279,7 @@ index df142a89b8c43acb81eb383eac0ef048a1f49a6e..00000000000000000000000000000000
|
||||
-}
|
||||
diff --git a/src/main/java/co/aikar/timings/Timings.java b/src/main/java/co/aikar/timings/Timings.java
|
||||
deleted file mode 100644
|
||||
index 27a02f0c3261067d8e4ee6169c62cecbbfe50d42..0000000000000000000000000000000000000000
|
||||
index 95b7cdf0677ef71e6885fa78aa5c75bb500f5f53..0000000000000000000000000000000000000000
|
||||
--- a/src/main/java/co/aikar/timings/Timings.java
|
||||
+++ /dev/null
|
||||
@@ -1,325 +0,0 @@
|
||||
@@ -1415,7 +1409,7 @@ index 27a02f0c3261067d8e4ee6169c62cecbbfe50d42..00000000000000000000000000000000
|
||||
- @NotNull
|
||||
- public static Timing ofStart(@NotNull Plugin plugin, @NotNull String name, @Nullable Timing groupHandler) {
|
||||
- Timing timing = of(plugin, name, groupHandler);
|
||||
- //timing.startTiming(); // Purpur
|
||||
- timing.startTiming();
|
||||
- return timing;
|
||||
- }
|
||||
-
|
||||
@@ -1437,7 +1431,7 @@ index 27a02f0c3261067d8e4ee6169c62cecbbfe50d42..00000000000000000000000000000000
|
||||
- */
|
||||
- public static void setTimingsEnabled(boolean enabled) {
|
||||
- if (enabled && !warnedAboutDeprecationOnEnable) {
|
||||
- //Bukkit.getLogger().severe(PlainTextComponentSerializer.plainText().serialize(deprecationMessage()));
|
||||
- Bukkit.getLogger().severe(PlainTextComponentSerializer.plainText().serialize(deprecationMessage()));
|
||||
- warnedAboutDeprecationOnEnable = true;
|
||||
- }
|
||||
- }
|
||||
@@ -1616,10 +1610,10 @@ index 27a02f0c3261067d8e4ee6169c62cecbbfe50d42..00000000000000000000000000000000
|
||||
-
|
||||
diff --git a/src/main/java/co/aikar/timings/TimingsCommand.java b/src/main/java/co/aikar/timings/TimingsCommand.java
|
||||
deleted file mode 100644
|
||||
index f28eec202237461cb489a2b13289d813381a25bc..0000000000000000000000000000000000000000
|
||||
index b83e5ff7ada8771fdf27ba9807c77ba6a4ce12da..0000000000000000000000000000000000000000
|
||||
--- a/src/main/java/co/aikar/timings/TimingsCommand.java
|
||||
+++ /dev/null
|
||||
@@ -1,130 +0,0 @@
|
||||
@@ -1,127 +0,0 @@
|
||||
-/*
|
||||
- * This file is licensed under the MIT License (MIT).
|
||||
- *
|
||||
@@ -1669,7 +1663,7 @@ index f28eec202237461cb489a2b13289d813381a25bc..00000000000000000000000000000000
|
||||
- public TimingsCommand(@NotNull String name) {
|
||||
- super(name);
|
||||
- this.description = "Manages Spigot Timings data to see performance of the server.";
|
||||
- this.usageMessage = "/timings";// <reset|report|on|off|verbon|verboff>"; // Purpur
|
||||
- this.usageMessage = "/timings <reset|report|on|off|verbon|verboff>";
|
||||
- this.setPermission("bukkit.command.timings");
|
||||
- }
|
||||
-
|
||||
@@ -1679,10 +1673,7 @@ index f28eec202237461cb489a2b13289d813381a25bc..00000000000000000000000000000000
|
||||
- return true;
|
||||
- }
|
||||
- if (true) {
|
||||
- net.kyori.adventure.text.minimessage.MiniMessage mm = net.kyori.adventure.text.minimessage.MiniMessage.miniMessage();
|
||||
- sender.sendMessage(mm.deserialize("<gold>Purpur has removed timings to save your performance. Please use <click:suggest_command:'/spark'><grey>/spark</grey></click> instead"));
|
||||
- sender.sendMessage(mm.deserialize("<gold>For more information, view its documentation at"));
|
||||
- sender.sendMessage(mm.deserialize("<gold><click:open_url:'https://spark.lucko.me/docs/Command-Usage'>https://spark.lucko.me/docs/Command-Usage</click>")); // Purpur
|
||||
- sender.sendMessage(Timings.deprecationMessage());
|
||||
- return true;
|
||||
- }
|
||||
- if (args.length < 1) {
|
||||
@@ -1743,7 +1734,7 @@ index f28eec202237461cb489a2b13289d813381a25bc..00000000000000000000000000000000
|
||||
- Preconditions.checkNotNull(args, "Arguments cannot be null");
|
||||
- Preconditions.checkNotNull(alias, "Alias cannot be null");
|
||||
-
|
||||
- if (false && args.length == 1) { // Purpur
|
||||
- if (args.length == 1) {
|
||||
- return StringUtil.copyPartialMatches(args[0], TIMINGS_SUBCOMMANDS,
|
||||
- new ArrayList<String>(TIMINGS_SUBCOMMANDS.size()));
|
||||
- }
|
||||
@@ -2103,158 +2094,9 @@ index 632c4961515f5052551f841cfa840e60bba7a257..00000000000000000000000000000000
|
||||
- super.stopTiming();
|
||||
- }
|
||||
-}
|
||||
diff --git a/src/main/java/org/bukkit/command/Command.java b/src/main/java/org/bukkit/command/Command.java
|
||||
index 74384a56eebbce41d431db2507c55eddbcf50a41..7d1ac11cfffbaf7d799f2a0032221fb23ee6daf5 100644
|
||||
--- a/src/main/java/org/bukkit/command/Command.java
|
||||
+++ b/src/main/java/org/bukkit/command/Command.java
|
||||
@@ -33,16 +33,6 @@ public abstract class Command {
|
||||
protected String usageMessage;
|
||||
private String permission;
|
||||
private net.kyori.adventure.text.Component permissionMessage; // Paper
|
||||
- /**
|
||||
- * @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>());
|
||||
diff --git a/src/main/java/org/bukkit/command/FormattedCommandAlias.java b/src/main/java/org/bukkit/command/FormattedCommandAlias.java
|
||||
index abe256e1e45ce28036da4aa1586715bc8a1a3414..9eab8024e0675865f17669847759a26d28f74f3a 100644
|
||||
--- a/src/main/java/org/bukkit/command/FormattedCommandAlias.java
|
||||
+++ b/src/main/java/org/bukkit/command/FormattedCommandAlias.java
|
||||
@@ -12,7 +12,6 @@ public class FormattedCommandAlias extends Command {
|
||||
|
||||
public FormattedCommandAlias(@NotNull String alias, @NotNull String[] formatStrings) {
|
||||
super(alias);
|
||||
- timings = co.aikar.timings.TimingsManager.getCommandTiming("minecraft", this); // Spigot
|
||||
this.formatStrings = formatStrings;
|
||||
}
|
||||
|
||||
@@ -120,10 +119,6 @@ public class FormattedCommandAlias extends Command {
|
||||
return formatString.trim(); // Paper - Causes an extra space at the end, breaks with brig commands
|
||||
}
|
||||
|
||||
- @NotNull
|
||||
- @Override // Paper
|
||||
- public String getTimingName() {return "Command Forwarder - " + super.getTimingName();} // Paper
|
||||
-
|
||||
private static boolean inRange(int i, int j, int k) {
|
||||
return i >= j && i <= k;
|
||||
}
|
||||
diff --git a/src/main/java/org/bukkit/command/SimpleCommandMap.java b/src/main/java/org/bukkit/command/SimpleCommandMap.java
|
||||
index 7740ad53796d08584bb0110f99af5639993e4d71..f0da5a8ae7e989e120f9d5ef2a417a9840aed7d0 100644
|
||||
--- a/src/main/java/org/bukkit/command/SimpleCommandMap.java
|
||||
+++ b/src/main/java/org/bukkit/command/SimpleCommandMap.java
|
||||
@@ -39,7 +39,6 @@ public class SimpleCommandMap implements CommandMap {
|
||||
register("bukkit", new VersionCommand("version"));
|
||||
register("bukkit", new ReloadCommand("reload"));
|
||||
//register("bukkit", new PluginsCommand("plugins")); // Paper
|
||||
- register("bukkit", new co.aikar.timings.TimingsCommand("timings")); // Paper
|
||||
}
|
||||
|
||||
public void setFallbackCommands() {
|
||||
@@ -71,7 +70,6 @@ public class SimpleCommandMap implements CommandMap {
|
||||
*/
|
||||
@Override
|
||||
public boolean register(@NotNull String label, @NotNull String fallbackPrefix, @NotNull Command command) {
|
||||
- command.timings = co.aikar.timings.TimingsManager.getCommandTiming(fallbackPrefix, command); // Paper
|
||||
label = label.toLowerCase(Locale.ROOT).trim();
|
||||
fallbackPrefix = fallbackPrefix.toLowerCase(Locale.ROOT).trim();
|
||||
boolean registered = register(label, command, false, fallbackPrefix);
|
||||
@@ -166,17 +164,9 @@ public class SimpleCommandMap implements CommandMap {
|
||||
parsedArgs = event.getArgs();
|
||||
// Purpur end
|
||||
|
||||
- // Paper start - Plugins do weird things to workaround normal registration
|
||||
- if (target.timings == null) {
|
||||
- target.timings = co.aikar.timings.TimingsManager.getCommandTiming(null, target);
|
||||
- }
|
||||
- // Paper end
|
||||
-
|
||||
try {
|
||||
- //try (co.aikar.timings.Timing ignored = target.timings.startTiming()) { // Paper - use try with resources // Purpur
|
||||
// Note: we don't return the result of target.execute as thats success / failure, we return handled (true) or not handled (false)
|
||||
target.execute(sender, sentCommandLabel, parsedArgs); // Purpur
|
||||
- //} // target.timings.stopTiming(); // Spigot // Paper // Purpur
|
||||
} catch (CommandException ex) {
|
||||
server.getPluginManager().callEvent(new com.destroystokyo.paper.event.server.ServerExceptionEvent(new com.destroystokyo.paper.exception.ServerCommandException(ex, target, sender, args))); // Paper
|
||||
//target.timings.stopTiming(); // Spigot // Paper
|
||||
diff --git a/src/main/java/org/bukkit/plugin/SimplePluginManager.java b/src/main/java/org/bukkit/plugin/SimplePluginManager.java
|
||||
index 2e6d62c4f3687e299c34e876c503b400e13be05a..0f5b442ea8e18d21c310205c217d22d18be3c863 100644
|
||||
--- a/src/main/java/org/bukkit/plugin/SimplePluginManager.java
|
||||
+++ b/src/main/java/org/bukkit/plugin/SimplePluginManager.java
|
||||
@@ -724,12 +724,7 @@ public final class SimplePluginManager implements PluginManager {
|
||||
throw new IllegalPluginAccessException("Plugin attempted to register " + event + " while not enabled");
|
||||
}
|
||||
|
||||
- executor = new co.aikar.timings.TimedEventExecutor(executor, plugin, null, event); // Paper
|
||||
- if (false) { // Spigot - RL handles useTimings check now // Paper
|
||||
- getEventListeners(event).register(new TimedRegisteredListener(listener, executor, priority, plugin, ignoreCancelled));
|
||||
- } else {
|
||||
- getEventListeners(event).register(new RegisteredListener(listener, executor, priority, plugin, ignoreCancelled));
|
||||
- }
|
||||
+ getEventListeners(event).register(new RegisteredListener(listener, executor, priority, plugin, ignoreCancelled));
|
||||
}
|
||||
|
||||
@NotNull
|
||||
@@ -959,8 +954,7 @@ public final class SimplePluginManager implements PluginManager {
|
||||
|
||||
@Override
|
||||
public boolean useTimings() {
|
||||
- if (true) {return this.paperPluginManager.useTimings();} // Paper
|
||||
- return co.aikar.timings.Timings.isTimingsEnabled(); // Spigot
|
||||
+ return false; // DivineMC - Delete Timings
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -970,7 +964,7 @@ public final class SimplePluginManager implements PluginManager {
|
||||
*/
|
||||
@Deprecated(forRemoval = true)
|
||||
public void useTimings(boolean use) {
|
||||
- co.aikar.timings.Timings.setTimingsEnabled(use); // Paper
|
||||
+
|
||||
}
|
||||
|
||||
// Paper start
|
||||
diff --git a/src/main/java/org/bukkit/plugin/java/JavaPluginLoader.java b/src/main/java/org/bukkit/plugin/java/JavaPluginLoader.java
|
||||
index e2b631fc160f13ea6e27b69f835bbdf83d6d3dec..b1b15caa19137e92ab08df7affcd37d1c249570d 100644
|
||||
--- a/src/main/java/org/bukkit/plugin/java/JavaPluginLoader.java
|
||||
+++ b/src/main/java/org/bukkit/plugin/java/JavaPluginLoader.java
|
||||
@@ -43,7 +43,6 @@ import org.bukkit.plugin.TimedRegisteredListener;
|
||||
import org.bukkit.plugin.UnknownDependencyException;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
-import org.spigotmc.CustomTimingsHandler; // Spigot
|
||||
import org.yaml.snakeyaml.error.YAMLException;
|
||||
|
||||
/**
|
||||
@@ -294,7 +293,7 @@ public final class JavaPluginLoader implements PluginLoader {
|
||||
}
|
||||
}
|
||||
|
||||
- EventExecutor executor = new co.aikar.timings.TimedEventExecutor(new EventExecutor() { // Paper
|
||||
+ EventExecutor executor = new EventExecutor() { // Paper
|
||||
@Override
|
||||
public void execute(@NotNull Listener listener, @NotNull Event event) throws EventException { // Paper
|
||||
try {
|
||||
@@ -308,7 +307,7 @@ public final class JavaPluginLoader implements PluginLoader {
|
||||
throw new EventException(t);
|
||||
}
|
||||
}
|
||||
- }, plugin, method, eventClass); // Paper
|
||||
+ }; // DivineMC - Delete Timings
|
||||
if (false) { // Spigot - RL handles useTimings check now
|
||||
eventSet.add(new TimedRegisteredListener(listener, executor, eh.priority(), plugin, eh.ignoreCancelled()));
|
||||
} else {
|
||||
diff --git a/src/main/java/org/spigotmc/CustomTimingsHandler.java b/src/main/java/org/spigotmc/CustomTimingsHandler.java
|
||||
deleted file mode 100644
|
||||
index 9c2d605c50cbf9aefa56ec209df9f6cea1392e89..0000000000000000000000000000000000000000
|
||||
index 12946bd55fcf7c40d39081779a7fa30049ee6165..0000000000000000000000000000000000000000
|
||||
--- a/src/main/java/org/spigotmc/CustomTimingsHandler.java
|
||||
+++ /dev/null
|
||||
@@ -1,67 +0,0 @@
|
||||
@@ -2321,7 +2163,7 @@ index 9c2d605c50cbf9aefa56ec209df9f6cea1392e89..00000000000000000000000000000000
|
||||
- handler = timing;
|
||||
- }
|
||||
-
|
||||
- public void startTiming() { /*handler.startTiming();*/ } // Purpur
|
||||
- public void stopTiming() { /*handler.stopTiming();*/ } // Purpur
|
||||
- public void startTiming() { handler.startTiming(); }
|
||||
- public void stopTiming() { handler.stopTiming(); }
|
||||
-
|
||||
-}
|
||||
@@ -1,25 +0,0 @@
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: NONPLAYT <76615486+NONPLAYT@users.noreply.github.com>
|
||||
Date: Tue, 14 May 2024 17:22:39 +0300
|
||||
Subject: [PATCH] DivineMC API Publish
|
||||
|
||||
|
||||
diff --git a/build.gradle.kts b/build.gradle.kts
|
||||
index db5b44861cabd70f7d9acb6a8a951efd68b97a18..95af32719a74893b0c0c7f20f178f222f8d24777 100644
|
||||
--- a/build.gradle.kts
|
||||
+++ b/build.gradle.kts
|
||||
@@ -266,3 +266,14 @@ tasks.withType<JavaCompile> {
|
||||
compilerArgs.add("-Xlint:-dep-ann")
|
||||
}
|
||||
// DivineMC end
|
||||
+
|
||||
+// DivineMC start - publish to GitHub Packages
|
||||
+publishing {
|
||||
+ repositories {
|
||||
+ maven("https://repo.bx-team.space/snapshots") {
|
||||
+ name = "divinemc"
|
||||
+ credentials(PasswordCredentials::class)
|
||||
+ }
|
||||
+ }
|
||||
+}
|
||||
+// DivineMC end
|
||||
@@ -1,81 +0,0 @@
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: NONPLAYT <76615486+NONPLAYT@users.noreply.github.com>
|
||||
Date: Thu, 11 Jul 2024 18:55:47 +0300
|
||||
Subject: [PATCH] Bump Dependencies
|
||||
|
||||
|
||||
diff --git a/build.gradle.kts b/build.gradle.kts
|
||||
index 95af32719a74893b0c0c7f20f178f222f8d24777..d6deb2136e314f9e9d66123ab4aaa60342156d3a 100644
|
||||
--- a/build.gradle.kts
|
||||
+++ b/build.gradle.kts
|
||||
@@ -9,11 +9,17 @@ java {
|
||||
withJavadocJar()
|
||||
}
|
||||
|
||||
+// DivineMC start - Bump Dependencies
|
||||
+repositories {
|
||||
+ mavenCentral()
|
||||
+}
|
||||
+// DivineMC end
|
||||
+
|
||||
val annotationsVersion = "24.1.0"
|
||||
val bungeeCordChatVersion = "1.20-R0.2"
|
||||
val adventureVersion = "4.17.0"
|
||||
-val slf4jVersion = "2.0.9"
|
||||
-val log4jVersion = "2.17.1"
|
||||
+val slf4jVersion = "2.0.13" // DivineMC - Bump Dependencies
|
||||
+val log4jVersion = "2.23.1" // DivineMC - Bump Dependencies
|
||||
val apiAndDocs: Configuration by configurations.creating {
|
||||
attributes {
|
||||
attribute(Category.CATEGORY_ATTRIBUTE, objects.named(Category.DOCUMENTATION))
|
||||
@@ -72,23 +78,23 @@ dependencies {
|
||||
implementation("org.ow2.asm:asm-commons:9.7.1")
|
||||
// Paper end
|
||||
|
||||
- api("org.apache.maven:maven-resolver-provider:3.9.6") // Paper - make API dependency for Paper Plugins
|
||||
- compileOnly("org.apache.maven.resolver:maven-resolver-connector-basic:1.9.18")
|
||||
- compileOnly("org.apache.maven.resolver:maven-resolver-transport-http:1.9.18")
|
||||
+ api("org.apache.maven:maven-resolver-provider:3.9.7") // Paper - make API dependency for Paper Plugins // DivineMC - Bump Dependencies
|
||||
+ compileOnly("org.apache.maven.resolver:maven-resolver-connector-basic:1.9.20") // DivineMC - Bump Dependencies
|
||||
+ compileOnly("org.apache.maven.resolver:maven-resolver-transport-http:1.9.20") // DivineMC - Bump Dependencies
|
||||
|
||||
val annotations = "org.jetbrains:annotations:$annotationsVersion" // Paper - we don't want Java 5 annotations...
|
||||
compileOnly(annotations)
|
||||
testCompileOnly(annotations)
|
||||
|
||||
// Paper start - add checker
|
||||
- val checkerQual = "org.checkerframework:checker-qual:3.33.0"
|
||||
+ val checkerQual = "org.checkerframework:checker-qual:3.44.0" // DivineMC - Bump Dependencies
|
||||
compileOnlyApi(checkerQual)
|
||||
testCompileOnly(checkerQual)
|
||||
// Paper end
|
||||
api("org.jspecify:jspecify:1.0.0") // Paper - add jspecify
|
||||
|
||||
- testImplementation("org.apache.commons:commons-lang3:3.12.0")
|
||||
- testImplementation("org.junit.jupiter:junit-jupiter:5.10.2")
|
||||
+ testImplementation("org.apache.commons:commons-lang3:3.14.0") // DivineMC - Bump Dependencies
|
||||
+ testImplementation("org.junit.jupiter:junit-jupiter:5.11.0-M2") // DivineMC - Bump Dependencies
|
||||
testImplementation("org.hamcrest:hamcrest:2.2")
|
||||
testImplementation("org.mockito:mockito-core:5.14.1")
|
||||
testImplementation("org.ow2.asm:asm-tree:9.7.1")
|
||||
@@ -182,7 +188,7 @@ tasks.withType<Javadoc> {
|
||||
"https://javadoc.io/doc/org.jetbrains/annotations/$annotationsVersion/", // Paper - we don't want Java 5 annotations
|
||||
// "https://javadoc.io/doc/net.md-5/bungeecord-chat/$bungeeCordChatVersion/", // Paper - don't link to bungee chat
|
||||
// Paper start - add missing javadoc links
|
||||
- "https://javadoc.io/doc/org.joml/joml/1.10.8/index.html",
|
||||
+ "https://javadoc.io/doc/org.joml/joml/latest/index.html", // DivineMC - Bump Dependencies
|
||||
"https://www.javadoc.io/doc/com.google.code.gson/gson/2.11.0",
|
||||
"https://jspecify.dev/docs/api/",
|
||||
// Paper end
|
||||
@@ -195,9 +201,9 @@ tasks.withType<Javadoc> {
|
||||
"https://jd.advntr.dev/text-serializer-plain/$adventureVersion/",
|
||||
"https://jd.advntr.dev/text-logger-slf4j/$adventureVersion/",
|
||||
"https://javadoc.io/doc/org.slf4j/slf4j-api/$slf4jVersion/",
|
||||
- "https://javadoc.io/doc/org.apache.logging.log4j/log4j-api/$log4jVersion/",
|
||||
+ "https://javadoc.io/doc/org.apache.logging.log4j/log4j-api/2.20.0", // DivineMC - Bump Dependencies
|
||||
// Paper end
|
||||
- "https://javadoc.io/doc/org.apache.maven.resolver/maven-resolver-api/1.7.3", // Paper
|
||||
+ "https://javadoc.io/doc/org.apache.maven.resolver/maven-resolver-api/1.9.19", // Paper // DivineMC - Bump Dependencies
|
||||
)
|
||||
options.tags("apiNote:a:API Note:")
|
||||
|
||||
Reference in New Issue
Block a user