From 0081e8ef817898ed7acf8232d09b3f3a0a777001 Mon Sep 17 00:00:00 2001 From: Max Lee Date: Tue, 1 Dec 2020 15:06:14 +0100 Subject: [PATCH] Fix plugin provides not being listed behind name in /plugins (#4825) --- .../0063-Make-plugins-list-alphabetical.patch | 16 ++++++---------- ...dd-an-asterisk-to-legacy-API-plugins.patch | 17 ++++++++++------- ...ocs-for-Entity.getEntitySpawnReason.patch} | 0 ...necessary-space-for-provided-plugins.patch | 19 ------------------- ....patch => 0229-Villager-resetOffers.patch} | 0 ...tch => 0230-Player-elytra-boost-API.patch} | 0 ...Add-getOfflinePlayerIfCached-String.patch} | 0 ...ch => 0232-Add-ignore-discounts-API.patch} | 0 ...> 0233-Item-no-age-no-player-pickup.patch} | 0 ...234-Beacon-API-custom-effect-ranges.patch} | 0 ...tch => 0235-Add-API-for-quit-reason.patch} | 0 ...patch => 0236-Add-Destroy-Speed-API.patch} | 0 12 files changed, 16 insertions(+), 36 deletions(-) rename Spigot-API-Patches/{0229-Clarify-the-Javadocs-for-Entity.getEntitySpawnReason.patch => 0228-Clarify-the-Javadocs-for-Entity.getEntitySpawnReason.patch} (100%) delete mode 100644 Spigot-API-Patches/0228-Remove-unnecessary-space-for-provided-plugins.patch rename Spigot-API-Patches/{0230-Villager-resetOffers.patch => 0229-Villager-resetOffers.patch} (100%) rename Spigot-API-Patches/{0231-Player-elytra-boost-API.patch => 0230-Player-elytra-boost-API.patch} (100%) rename Spigot-API-Patches/{0232-Add-getOfflinePlayerIfCached-String.patch => 0231-Add-getOfflinePlayerIfCached-String.patch} (100%) rename Spigot-API-Patches/{0233-Add-ignore-discounts-API.patch => 0232-Add-ignore-discounts-API.patch} (100%) rename Spigot-API-Patches/{0234-Item-no-age-no-player-pickup.patch => 0233-Item-no-age-no-player-pickup.patch} (100%) rename Spigot-API-Patches/{0235-Beacon-API-custom-effect-ranges.patch => 0234-Beacon-API-custom-effect-ranges.patch} (100%) rename Spigot-API-Patches/{0236-Add-API-for-quit-reason.patch => 0235-Add-API-for-quit-reason.patch} (100%) rename Spigot-API-Patches/{0237-Add-Destroy-Speed-API.patch => 0236-Add-Destroy-Speed-API.patch} (100%) diff --git a/Spigot-API-Patches/0063-Make-plugins-list-alphabetical.patch b/Spigot-API-Patches/0063-Make-plugins-list-alphabetical.patch index 2c2543850f..ec1fc9814a 100644 --- a/Spigot-API-Patches/0063-Make-plugins-list-alphabetical.patch +++ b/Spigot-API-Patches/0063-Make-plugins-list-alphabetical.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Make /plugins list alphabetical diff --git a/src/main/java/org/bukkit/command/defaults/PluginsCommand.java b/src/main/java/org/bukkit/command/defaults/PluginsCommand.java -index bcb576a4271b1ec7b1cfe6f83cf161b7d89ed2e5..9b2e28d04be7a89bdd0fb27d1d1f3f71846edefb 100644 +index bcb576a4271b1ec7b1cfe6f83cf161b7d89ed2e5..4de959bbd1270d7d6ea8e5e69521bcca6abe2138 100644 --- a/src/main/java/org/bukkit/command/defaults/PluginsCommand.java +++ b/src/main/java/org/bukkit/command/defaults/PluginsCommand.java @@ -3,6 +3,9 @@ package org.bukkit.command.defaults; @@ -18,7 +18,7 @@ index bcb576a4271b1ec7b1cfe6f83cf161b7d89ed2e5..9b2e28d04be7a89bdd0fb27d1d1f3f71 import org.bukkit.Bukkit; import org.bukkit.ChatColor; import org.bukkit.command.CommandSender; -@@ -34,23 +37,33 @@ public class PluginsCommand extends BukkitCommand { +@@ -34,15 +37,22 @@ public class PluginsCommand extends BukkitCommand { @NotNull private String getPluginList() { @@ -39,17 +39,13 @@ index bcb576a4271b1ec7b1cfe6f83cf161b7d89ed2e5..9b2e28d04be7a89bdd0fb27d1d1f3f71 pluginList.append(", "); } -- pluginList.append(plugin.isEnabled() ? ChatColor.GREEN : ChatColor.RED); -- pluginList.append(plugin.getDescription().getName()); + Plugin plugin = entry.getValue(); ++ + pluginList.append(plugin.isEnabled() ? ChatColor.GREEN : ChatColor.RED); + pluginList.append(plugin.getDescription().getName()); - if (plugin.getDescription().getProvides().size() > 0) { - pluginList.append(" (").append(String.join(", ", plugin.getDescription().getProvides())).append(")"); +@@ -51,6 +61,8 @@ public class PluginsCommand extends BukkitCommand { } -+ -+ -+ pluginList.append(plugin.isEnabled() ? ChatColor.GREEN : ChatColor.RED); -+ pluginList.append(plugin.getDescription().getName()); } - return "(" + plugins.length + "): " + pluginList.toString(); diff --git a/Spigot-API-Patches/0118-Add-an-asterisk-to-legacy-API-plugins.patch b/Spigot-API-Patches/0118-Add-an-asterisk-to-legacy-API-plugins.patch index d9fcddb303..d743e794ed 100644 --- a/Spigot-API-Patches/0118-Add-an-asterisk-to-legacy-API-plugins.patch +++ b/Spigot-API-Patches/0118-Add-an-asterisk-to-legacy-API-plugins.patch @@ -1,6 +1,6 @@ From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 -From: Zach Brown -Date: Thu, 19 Jul 2018 22:07:02 +0200 +From: Phoenix616 +Date: Tue, 1 Dec 2020 14:57:02 +0100 Subject: [PATCH] Add an asterisk to legacy API plugins Not here to name and shame, only so server admins can be aware of which @@ -23,12 +23,15 @@ index 1b6d737046646c102b0d519ab3f67c3fbd503979..541e28a9bece0beb0c2cf02c39030840 // 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 9b2e28d04be7a89bdd0fb27d1d1f3f71846edefb..fd74512a2bbbb0f198192b450e09bdbb9bac248d 100644 +index 4de959bbd1270d7d6ea8e5e69521bcca6abe2138..1aa58c59e1e8738bbdc77752885ff3b18b29de42 100644 --- a/src/main/java/org/bukkit/command/defaults/PluginsCommand.java +++ b/src/main/java/org/bukkit/command/defaults/PluginsCommand.java -@@ -59,7 +59,13 @@ public class PluginsCommand extends BukkitCommand { - +@@ -52,9 +52,15 @@ public class PluginsCommand extends BukkitCommand { + } + Plugin plugin = entry.getValue(); +- ++ pluginList.append(plugin.isEnabled() ? ChatColor.GREEN : ChatColor.RED); - pluginList.append(plugin.getDescription().getName()); + // Paper start - Add an asterisk to legacy plugins (so admins are aware) @@ -38,9 +41,9 @@ index 9b2e28d04be7a89bdd0fb27d1d1f3f71846edefb..fd74512a2bbbb0f198192b450e09bdbb + } + pluginList.append(pluginName); + // Paper end - } - return "(" + plugins.size() + "): " + pluginList.toString(); + if (plugin.getDescription().getProvides().size() > 0) { + pluginList.append(" (").append(String.join(", ", plugin.getDescription().getProvides())).append(")"); diff --git a/src/main/java/org/bukkit/plugin/java/JavaPluginLoader.java b/src/main/java/org/bukkit/plugin/java/JavaPluginLoader.java index bef88a6e2e6f7071401a3af0aec31e62aa265566..de44d850d7b3ab3e528eb6f2de375a6c3e0e5cf9 100644 --- a/src/main/java/org/bukkit/plugin/java/JavaPluginLoader.java diff --git a/Spigot-API-Patches/0229-Clarify-the-Javadocs-for-Entity.getEntitySpawnReason.patch b/Spigot-API-Patches/0228-Clarify-the-Javadocs-for-Entity.getEntitySpawnReason.patch similarity index 100% rename from Spigot-API-Patches/0229-Clarify-the-Javadocs-for-Entity.getEntitySpawnReason.patch rename to Spigot-API-Patches/0228-Clarify-the-Javadocs-for-Entity.getEntitySpawnReason.patch diff --git a/Spigot-API-Patches/0228-Remove-unnecessary-space-for-provided-plugins.patch b/Spigot-API-Patches/0228-Remove-unnecessary-space-for-provided-plugins.patch deleted file mode 100644 index aa89f17a92..0000000000 --- a/Spigot-API-Patches/0228-Remove-unnecessary-space-for-provided-plugins.patch +++ /dev/null @@ -1,19 +0,0 @@ -From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 -From: Aurora -Date: Sat, 3 Oct 2020 21:26:01 +0200 -Subject: [PATCH] Remove unnecessary space for provided plugins - - -diff --git a/src/main/java/org/bukkit/command/defaults/PluginsCommand.java b/src/main/java/org/bukkit/command/defaults/PluginsCommand.java -index fd74512a2bbbb0f198192b450e09bdbb9bac248d..9e17a107947c401936ab0550508dd6fb93415d81 100644 ---- a/src/main/java/org/bukkit/command/defaults/PluginsCommand.java -+++ b/src/main/java/org/bukkit/command/defaults/PluginsCommand.java -@@ -54,7 +54,7 @@ public class PluginsCommand extends BukkitCommand { - Plugin plugin = entry.getValue(); - - if (plugin.getDescription().getProvides().size() > 0) { -- pluginList.append(" (").append(String.join(", ", plugin.getDescription().getProvides())).append(")"); -+ pluginList.append("(").append(String.join(", ", plugin.getDescription().getProvides())).append(")"); // Paper - Remove unnecessary space - } - - diff --git a/Spigot-API-Patches/0230-Villager-resetOffers.patch b/Spigot-API-Patches/0229-Villager-resetOffers.patch similarity index 100% rename from Spigot-API-Patches/0230-Villager-resetOffers.patch rename to Spigot-API-Patches/0229-Villager-resetOffers.patch diff --git a/Spigot-API-Patches/0231-Player-elytra-boost-API.patch b/Spigot-API-Patches/0230-Player-elytra-boost-API.patch similarity index 100% rename from Spigot-API-Patches/0231-Player-elytra-boost-API.patch rename to Spigot-API-Patches/0230-Player-elytra-boost-API.patch diff --git a/Spigot-API-Patches/0232-Add-getOfflinePlayerIfCached-String.patch b/Spigot-API-Patches/0231-Add-getOfflinePlayerIfCached-String.patch similarity index 100% rename from Spigot-API-Patches/0232-Add-getOfflinePlayerIfCached-String.patch rename to Spigot-API-Patches/0231-Add-getOfflinePlayerIfCached-String.patch diff --git a/Spigot-API-Patches/0233-Add-ignore-discounts-API.patch b/Spigot-API-Patches/0232-Add-ignore-discounts-API.patch similarity index 100% rename from Spigot-API-Patches/0233-Add-ignore-discounts-API.patch rename to Spigot-API-Patches/0232-Add-ignore-discounts-API.patch diff --git a/Spigot-API-Patches/0234-Item-no-age-no-player-pickup.patch b/Spigot-API-Patches/0233-Item-no-age-no-player-pickup.patch similarity index 100% rename from Spigot-API-Patches/0234-Item-no-age-no-player-pickup.patch rename to Spigot-API-Patches/0233-Item-no-age-no-player-pickup.patch diff --git a/Spigot-API-Patches/0235-Beacon-API-custom-effect-ranges.patch b/Spigot-API-Patches/0234-Beacon-API-custom-effect-ranges.patch similarity index 100% rename from Spigot-API-Patches/0235-Beacon-API-custom-effect-ranges.patch rename to Spigot-API-Patches/0234-Beacon-API-custom-effect-ranges.patch diff --git a/Spigot-API-Patches/0236-Add-API-for-quit-reason.patch b/Spigot-API-Patches/0235-Add-API-for-quit-reason.patch similarity index 100% rename from Spigot-API-Patches/0236-Add-API-for-quit-reason.patch rename to Spigot-API-Patches/0235-Add-API-for-quit-reason.patch diff --git a/Spigot-API-Patches/0237-Add-Destroy-Speed-API.patch b/Spigot-API-Patches/0236-Add-Destroy-Speed-API.patch similarity index 100% rename from Spigot-API-Patches/0237-Add-Destroy-Speed-API.patch rename to Spigot-API-Patches/0236-Add-Destroy-Speed-API.patch