Mirror von
https://github.com/IntellectualSites/FastAsyncWorldEdit.git
synchronisiert 2024-11-20 01:40:06 +01:00
feat: Sort plugins on debugpaste (#1429)
* Replace plugins with an array and sort them by their name. Resolves #1428 * Use comparator Co-authored-by: Alex <mc.cache@web.de>
Dieser Commit ist enthalten in:
Ursprung
1e5e9e04b4
Commit
fc4517fe4c
@ -47,6 +47,9 @@ import org.bukkit.plugin.PluginManager;
|
||||
import java.io.File;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collection;
|
||||
import java.util.Collections;
|
||||
import java.util.Comparator;
|
||||
import java.util.List;
|
||||
import java.util.UUID;
|
||||
import java.util.function.Supplier;
|
||||
|
||||
@ -148,9 +151,13 @@ public class FaweBukkit implements IFawe, Listener {
|
||||
@Override
|
||||
public String getDebugInfo() {
|
||||
StringBuilder msg = new StringBuilder();
|
||||
Plugin[] plugins = Bukkit.getServer().getPluginManager().getPlugins();
|
||||
|
||||
List<Plugin> plugins = new ArrayList<>();
|
||||
Collections.addAll(plugins, Bukkit.getServer().getPluginManager().getPlugins());
|
||||
plugins.sort(Comparator.comparing(Plugin::getName));
|
||||
|
||||
msg.append("Server Version: ").append(Bukkit.getVersion()).append("\n");
|
||||
msg.append("Plugins (").append(plugins.length).append("):\n");
|
||||
msg.append("Plugins (").append(plugins.size()).append("):\n");
|
||||
for (Plugin p : plugins) {
|
||||
msg.append(" - ").append(p.getName()).append(":").append("\n")
|
||||
.append(" • Version: ").append(p.getDescription().getVersion()).append("\n")
|
||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren