mirror of
https://github.com/PaperMC/Paper.git
synced 2024-12-28 23:38:25 +01:00
e1088e833c
Upstream has released updates that appears to apply and compile correctly. This update has not been tested by PaperMC and as with ANY update, please do your own testing Bukkit Changes: f009c3dd SPIGOT-5810, SPIGOT-5835: 'Better' handling of Player.isOnGround e677c370 Update ECJ version 5058a35d SPIGOT-5860: Item.setItemStack should be NotNull CraftBukkit Changes:d77f4d9b
SPIGOT-5810, SPIGOT-5835: 'Better' handling of Player.isOnGround53c95627
SPIGOT-5865: Piglin does not trigger EntityPickupItemEvent2ab04d24
Update ECJ version7884e079
SPIGOT-5868: Blocks do not tick in custom nether / end2a848286
SPIGOT-5863: Don't check colour in scoreboard length validationf2cbce30
SPIGOT-5866: Beehive unknown TargetReason Spigot Changes: ad703da0 SPIGOT-5870: /plugins "website" field shows "version" 1a27cfd8 #98: Improve output of /plugins command using text components 732d5bab Disable checkstyle in Spigot blocks 0199a9a6 #97: Add Memory Usage to Ticks Per Second Command. 33ea98fc SPIGOT-5858: NPE: Joining the server with an invalid dimension
60 lines
2.4 KiB
Diff
60 lines
2.4 KiB
Diff
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
|
From: BillyGalbreath <Blake.Galbreath@GMail.com>
|
|
Date: Mon, 31 Jul 2017 02:08:55 -0500
|
|
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 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
|
|
--- a/src/main/java/org/bukkit/command/defaults/PluginsCommand.java
|
|
+++ b/src/main/java/org/bukkit/command/defaults/PluginsCommand.java
|
|
@@ -0,0 +0,0 @@ package org.bukkit.command.defaults;
|
|
import java.util.Arrays;
|
|
import java.util.Collections;
|
|
import java.util.List;
|
|
+import java.util.Map;
|
|
+import java.util.TreeMap;
|
|
+
|
|
import org.bukkit.Bukkit;
|
|
import org.bukkit.ChatColor;
|
|
import org.bukkit.command.CommandSender;
|
|
@@ -0,0 +0,0 @@ public class PluginsCommand extends BukkitCommand {
|
|
|
|
@NotNull
|
|
private String getPluginList() {
|
|
- StringBuilder pluginList = new StringBuilder();
|
|
- Plugin[] plugins = Bukkit.getPluginManager().getPlugins();
|
|
+ // Paper start
|
|
+ TreeMap<String, Plugin> plugins = new TreeMap<>(String.CASE_INSENSITIVE_ORDER);
|
|
|
|
- for (Plugin plugin : plugins) {
|
|
+ for (Plugin plugin : Bukkit.getPluginManager().getPlugins()) {
|
|
+ plugins.put(plugin.getDescription().getName(), plugin);
|
|
+ }
|
|
+
|
|
+ StringBuilder pluginList = new StringBuilder();
|
|
+ for (Map.Entry<String, Plugin> entry : plugins.entrySet()) {
|
|
if (pluginList.length() > 0) {
|
|
pluginList.append(ChatColor.WHITE);
|
|
pluginList.append(", ");
|
|
}
|
|
|
|
- pluginList.append(plugin.isEnabled() ? ChatColor.GREEN : ChatColor.RED);
|
|
- pluginList.append(plugin.getDescription().getName());
|
|
+ Plugin plugin = entry.getValue();
|
|
|
|
if (plugin.getDescription().getProvides().size() > 0) {
|
|
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.size() + "): " + pluginList.toString();
|
|
+ // Paper end
|
|
}
|
|
|
|
// Spigot start
|