From f4409a6d9215c4ee3fae56b6267d565cc951f18a Mon Sep 17 00:00:00 2001 From: extendedclip Date: Fri, 10 May 2019 10:28:59 -0400 Subject: [PATCH] Fix numerical order of expansions in papi ecloud list --- .../commands/ExpansionCloudCommands.java | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/src/main/java/me/clip/placeholderapi/commands/ExpansionCloudCommands.java b/src/main/java/me/clip/placeholderapi/commands/ExpansionCloudCommands.java index df68235..e6d0952 100644 --- a/src/main/java/me/clip/placeholderapi/commands/ExpansionCloudCommands.java +++ b/src/main/java/me/clip/placeholderapi/commands/ExpansionCloudCommands.java @@ -20,13 +20,6 @@ */ package me.clip.placeholderapi.commands; -import static me.clip.placeholderapi.util.Msg.color; -import static me.clip.placeholderapi.util.Msg.msg; - -import java.util.HashMap; -import java.util.List; -import java.util.Map; -import java.util.stream.Collectors; import me.clip.placeholderapi.PlaceholderAPI; import me.clip.placeholderapi.PlaceholderAPIPlugin; import me.clip.placeholderapi.expansion.PlaceholderExpansion; @@ -37,6 +30,14 @@ import org.bukkit.command.CommandExecutor; import org.bukkit.command.CommandSender; import org.bukkit.entity.Player; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.stream.Collectors; + +import static me.clip.placeholderapi.util.Msg.color; +import static me.clip.placeholderapi.util.Msg.msg; + public class ExpansionCloudCommands implements CommandExecutor { private PlaceholderAPIPlugin plugin; @@ -327,7 +328,7 @@ public class ExpansionCloudCommands implements CommandExecutor { expansions.put(exp.getName(), exp); } List ce = expansions.keySet().stream().sorted().collect(Collectors.toList()); - int i = 1; + int i = (int) ex.keySet().toArray()[0]+1; for (String name : ce) { if (expansions.get(name) == null) { continue;