mirror of
https://github.com/PaperMC/Paper.git
synced 2024-11-05 18:31:29 +01:00
835bc39b03
Updated Upstream (Bukkit/CraftBukkit/Spigot) Bukkit Changes: 2dcc44dc SPIGOT-4307: Fix hacky API for banners on shields e0fc6572 SPIGOT-4309: Add "forced" display of particles efeeab2f Add index to README.md for easier navigation f502bc6f Update to Minecraft 1.13.1 CraftBukkit Changes:d0bb0a1d
Fix some tests randomly failing997d378d
Fix client stall in specific teleportation scenariosb3dc2366
SPIGOT-4307: Fix hacky API for banners on shields2a271162
SPIGOT-4301: Fix more invalid enchants5d0d83bb
SPIGOT-4309: Add "forced" display of particlesa6772578
Add additional tests for CraftBlockDatace1af0c3
Update to Minecraft 1.13.1 Spigot Changes: 2440e189 Rebuild patches 4ecffced Update to Minecraft 1.13.1
67 lines
3.1 KiB
Diff
67 lines
3.1 KiB
Diff
From e90f5e3a1992b807e97829fc570ce25f05b7811c Mon Sep 17 00:00:00 2001
|
|
From: Zach Brown <zach.brown@destroystokyo.com>
|
|
Date: Thu, 19 Jul 2018 15:07:02 -0500
|
|
Subject: [PATCH] Add an asterisk to legacy API plugins
|
|
|
|
Not here to name and shame, only so server admins can be aware of which
|
|
plugins have and haven't been updated.
|
|
|
|
diff --git a/src/main/java/org/bukkit/UnsafeValues.java b/src/main/java/org/bukkit/UnsafeValues.java
|
|
index 33cad9015..aff1d8e9b 100644
|
|
--- a/src/main/java/org/bukkit/UnsafeValues.java
|
|
+++ b/src/main/java/org/bukkit/UnsafeValues.java
|
|
@@ -66,4 +66,10 @@ public interface UnsafeValues {
|
|
* @return true if a file matching this key was found and deleted
|
|
*/
|
|
boolean removeAdvancement(NamespacedKey key);
|
|
+
|
|
+ // Paper start - Add legacy check util
|
|
+ static boolean isLegacyPlugin(org.bukkit.plugin.Plugin plugin) {
|
|
+ return !("1.13".equals(plugin.getDescription().getAPIVersion()));
|
|
+ }
|
|
+ // Paper end
|
|
}
|
|
diff --git a/src/main/java/org/bukkit/command/defaults/PluginsCommand.java b/src/main/java/org/bukkit/command/defaults/PluginsCommand.java
|
|
index b1d384e82..72c0c0bc6 100644
|
|
--- a/src/main/java/org/bukkit/command/defaults/PluginsCommand.java
|
|
+++ b/src/main/java/org/bukkit/command/defaults/PluginsCommand.java
|
|
@@ -38,7 +38,14 @@ public class PluginsCommand extends BukkitCommand {
|
|
TreeMap<String, ChatColor> plugins = new TreeMap<>(String.CASE_INSENSITIVE_ORDER);
|
|
|
|
for (Plugin plugin : Bukkit.getPluginManager().getPlugins()) {
|
|
- plugins.put(plugin.getDescription().getName(), plugin.isEnabled() ? ChatColor.GREEN : ChatColor.RED);
|
|
+ // Paper start - Add an asterisk to legacy plugins (so admins are aware)
|
|
+ String pluginName = plugin.getDescription().getName();
|
|
+ if (org.bukkit.UnsafeValues.isLegacyPlugin(plugin)) {
|
|
+ pluginName += "*";
|
|
+ }
|
|
+
|
|
+ plugins.put(pluginName, plugin.isEnabled() ? ChatColor.GREEN : ChatColor.RED);
|
|
+ // Paper end
|
|
}
|
|
|
|
StringBuilder pluginList = new StringBuilder();
|
|
diff --git a/src/main/java/org/bukkit/plugin/java/JavaPluginLoader.java b/src/main/java/org/bukkit/plugin/java/JavaPluginLoader.java
|
|
index 3cff01b6b..2b9aad0a7 100644
|
|
--- a/src/main/java/org/bukkit/plugin/java/JavaPluginLoader.java
|
|
+++ b/src/main/java/org/bukkit/plugin/java/JavaPluginLoader.java
|
|
@@ -303,7 +303,14 @@ public final class JavaPluginLoader implements PluginLoader {
|
|
Validate.isTrue(plugin instanceof JavaPlugin, "Plugin is not associated with this PluginLoader");
|
|
|
|
if (!plugin.isEnabled()) {
|
|
- plugin.getLogger().info("Enabling " + plugin.getDescription().getFullName());
|
|
+ // Paper start - Add an asterisk to legacy plugins (so admins are aware)
|
|
+ String enableMsg = "Enabling " + plugin.getDescription().getFullName();
|
|
+ if (org.bukkit.UnsafeValues.isLegacyPlugin(plugin)) {
|
|
+ enableMsg += "*";
|
|
+ }
|
|
+
|
|
+ plugin.getLogger().info(enableMsg);
|
|
+ // Paper end
|
|
|
|
JavaPlugin jPlugin = (JavaPlugin) plugin;
|
|
|
|
--
|
|
2.18.0
|
|
|