Archiviert
13
0

Fix plugin provides not being listed behind name in /plugins (#4825)

Dieser Commit ist enthalten in:
Max Lee 2020-12-01 15:06:14 +01:00 committet von GitHub
Ursprung 9119af508c
Commit 0081e8ef81
Es konnte kein GPG-Schlüssel zu dieser Signatur gefunden werden
GPG-Schlüssel-ID: 4AEE18F83AFDEB23
12 geänderte Dateien mit 16 neuen und 36 gelöschten Zeilen

Datei anzeigen

@ -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 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 --- a/src/main/java/org/bukkit/command/defaults/PluginsCommand.java
+++ b/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; @@ -3,6 +3,9 @@ package org.bukkit.command.defaults;
@ -18,7 +18,7 @@ index bcb576a4271b1ec7b1cfe6f83cf161b7d89ed2e5..9b2e28d04be7a89bdd0fb27d1d1f3f71
import org.bukkit.Bukkit; import org.bukkit.Bukkit;
import org.bukkit.ChatColor; import org.bukkit.ChatColor;
import org.bukkit.command.CommandSender; import org.bukkit.command.CommandSender;
@@ -34,23 +37,33 @@ public class PluginsCommand extends BukkitCommand { @@ -34,15 +37,22 @@ public class PluginsCommand extends BukkitCommand {
@NotNull @NotNull
private String getPluginList() { private String getPluginList() {
@ -39,17 +39,13 @@ index bcb576a4271b1ec7b1cfe6f83cf161b7d89ed2e5..9b2e28d04be7a89bdd0fb27d1d1f3f71
pluginList.append(", "); pluginList.append(", ");
} }
- pluginList.append(plugin.isEnabled() ? ChatColor.GREEN : ChatColor.RED);
- pluginList.append(plugin.getDescription().getName());
+ Plugin plugin = entry.getValue(); + Plugin plugin = entry.getValue();
+
pluginList.append(plugin.isEnabled() ? ChatColor.GREEN : ChatColor.RED);
pluginList.append(plugin.getDescription().getName());
if (plugin.getDescription().getProvides().size() > 0) { @@ -51,6 +61,8 @@ public class PluginsCommand extends BukkitCommand {
pluginList.append(" (").append(String.join(", ", plugin.getDescription().getProvides())).append(")");
} }
+
+
+ pluginList.append(plugin.isEnabled() ? ChatColor.GREEN : ChatColor.RED);
+ pluginList.append(plugin.getDescription().getName());
} }
- return "(" + plugins.length + "): " + pluginList.toString(); - return "(" + plugins.length + "): " + pluginList.toString();

Datei anzeigen

@ -1,6 +1,6 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Zach Brown <zach.brown@destroystokyo.com> From: Phoenix616 <max@themoep.de>
Date: Thu, 19 Jul 2018 22:07:02 +0200 Date: Tue, 1 Dec 2020 14:57:02 +0100
Subject: [PATCH] Add an asterisk to legacy API plugins Subject: [PATCH] Add an asterisk to legacy API plugins
Not here to name and shame, only so server admins can be aware of which Not here to name and shame, only so server admins can be aware of which
@ -23,12 +23,15 @@ index 1b6d737046646c102b0d519ab3f67c3fbd503979..541e28a9bece0beb0c2cf02c39030840
// Paper end // Paper end
} }
diff --git a/src/main/java/org/bukkit/command/defaults/PluginsCommand.java b/src/main/java/org/bukkit/command/defaults/PluginsCommand.java 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 --- a/src/main/java/org/bukkit/command/defaults/PluginsCommand.java
+++ b/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.isEnabled() ? ChatColor.GREEN : ChatColor.RED);
- pluginList.append(plugin.getDescription().getName()); - pluginList.append(plugin.getDescription().getName());
+ // Paper start - Add an asterisk to legacy plugins (so admins are aware) + // Paper start - Add an asterisk to legacy plugins (so admins are aware)
@ -38,9 +41,9 @@ index 9b2e28d04be7a89bdd0fb27d1d1f3f71846edefb..fd74512a2bbbb0f198192b450e09bdbb
+ } + }
+ pluginList.append(pluginName); + pluginList.append(pluginName);
+ // Paper end + // 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 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 index bef88a6e2e6f7071401a3af0aec31e62aa265566..de44d850d7b3ab3e528eb6f2de375a6c3e0e5cf9 100644
--- a/src/main/java/org/bukkit/plugin/java/JavaPluginLoader.java --- a/src/main/java/org/bukkit/plugin/java/JavaPluginLoader.java

Datei anzeigen

@ -1,19 +0,0 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Aurora <aurora@relanet.eu>
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
}