From 29c61373b027712ee2bef009545ad6a4eb009f15 Mon Sep 17 00:00:00 2001 From: Mitchell Cook Date: Sun, 14 Apr 2019 06:34:03 +1000 Subject: [PATCH] Implementing #93 (#94) Testing required before PR. --- .../clip/placeholderapi/commands/ExpansionCloudCommands.java | 3 ++- .../clip/placeholderapi/commands/PlaceholderAPICommands.java | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/src/main/java/me/clip/placeholderapi/commands/ExpansionCloudCommands.java b/src/main/java/me/clip/placeholderapi/commands/ExpansionCloudCommands.java index 0c7ea57..6a12938 100644 --- a/src/main/java/me/clip/placeholderapi/commands/ExpansionCloudCommands.java +++ b/src/main/java/me/clip/placeholderapi/commands/ExpansionCloudCommands.java @@ -26,6 +26,7 @@ import static me.clip.placeholderapi.util.Msg.msg; import java.util.List; import java.util.Map; import java.util.Map.Entry; +import java.util.stream.Collectors; import me.clip.placeholderapi.PlaceholderAPI; import me.clip.placeholderapi.PlaceholderAPIPlugin; import me.clip.placeholderapi.expansion.PlaceholderExpansion; @@ -319,7 +320,7 @@ public class ExpansionCloudCommands implements CommandExecutor { if (!(s instanceof Player)) { - for (Entry expansion : ex.entrySet()) { + for (Entry expansion : ex.entrySet().stream().sorted().collect(Collectors.toList())) { if (expansion == null || expansion.getValue() == null) { continue; } diff --git a/src/main/java/me/clip/placeholderapi/commands/PlaceholderAPICommands.java b/src/main/java/me/clip/placeholderapi/commands/PlaceholderAPICommands.java index 3dbc6cd..3054c86 100644 --- a/src/main/java/me/clip/placeholderapi/commands/PlaceholderAPICommands.java +++ b/src/main/java/me/clip/placeholderapi/commands/PlaceholderAPICommands.java @@ -21,6 +21,7 @@ package me.clip.placeholderapi.commands; import java.util.Set; +import java.util.stream.Collectors; import me.clip.placeholderapi.PlaceholderAPI; import me.clip.placeholderapi.PlaceholderAPIPlugin; import me.clip.placeholderapi.expansion.PlaceholderExpansion; @@ -237,7 +238,7 @@ public class PlaceholderAPICommands implements CommandExecutor { return true; } Msg.msg(s, registered.size() + " &7Placeholder hooks registered:"); - Msg.msg(s, registered.toString()); + Msg.msg(s, registered.stream().sorted().collect(Collectors.joining(", "))); } else if (args.length > 1 && args[0].equalsIgnoreCase("register")) { if (s instanceof Player) {