mirror of
https://github.com/PurpurMC/Purpur.git
synced 2026-02-17 16:37:43 +01:00
Upstream has released updates that appear to apply and compile correctly Paper Changes: 12dec20 Bump paerweight to 1.1.7 e33ed89 Get short commit ref using a more proper method 7d6147d Remove now unneeded patch due to paperweight 1.1.7 e72fa41 Update task dependency for includeMappings so the new task isn't skipped 0ad5526 Trim whitspace off of git hash (oops) Tuinity Changes: e878ba9 Update paper 2bd2849 Bring back fix codec spam patch
28 lines
1.3 KiB
Diff
28 lines
1.3 KiB
Diff
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
|
From: William Blake Galbreath <Blake.Galbreath@GMail.com>
|
|
Date: Tue, 8 Dec 2020 09:48:18 -0600
|
|
Subject: [PATCH] Alphabetize in-game /plugins list
|
|
|
|
|
|
diff --git a/src/main/java/org/bukkit/command/defaults/PluginsCommand.java b/src/main/java/org/bukkit/command/defaults/PluginsCommand.java
|
|
index 4974fc518c3645e6e060ff52e71a47a86d52ec5c..37cc5d7e9db89e4ef7ab16da1b159bd19134a4ff 100644
|
|
--- a/src/main/java/org/bukkit/command/defaults/PluginsCommand.java
|
|
+++ b/src/main/java/org/bukkit/command/defaults/PluginsCommand.java
|
|
@@ -2,6 +2,7 @@ package org.bukkit.command.defaults;
|
|
|
|
import java.util.Arrays;
|
|
import java.util.Collections;
|
|
+import java.util.Comparator;
|
|
import java.util.List;
|
|
import java.util.Map;
|
|
import java.util.TreeMap;
|
|
@@ -89,7 +90,7 @@ public class PluginsCommand extends BukkitCommand {
|
|
// Spigot start
|
|
@NotNull
|
|
private BaseComponent[] getPluginListSpigot() {
|
|
- Plugin[] plugins = Bukkit.getPluginManager().getPlugins();
|
|
+ Plugin[] plugins = Arrays.stream(Bukkit.getPluginManager().getPlugins()).sorted(Comparator.comparing(plugin -> plugin.getName().toLowerCase())).toArray(Plugin[]::new); // Purpur
|
|
ComponentBuilder pluginList = new ComponentBuilder("Plugins (" + plugins.length + "): ");
|
|
|
|
int index = 0;
|