Skip to content

Commit 1b010da

Browse files
committed
Added Alphabetical ordering (At the request of Lex)
1 parent f71ca08 commit 1b010da

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

src/main/java/org/mangorage/mangobotsite/website/servlet/TricksServlet.java

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,15 @@
44
import jakarta.servlet.http.HttpServletRequest;
55
import jakarta.servlet.http.HttpServletResponse;
66
import net.dv8tion.jda.api.JDA;
7+
import org.mangorage.mangobotplugin.commands.trick.Trick;
78
import org.mangorage.mangobotplugin.commands.trick.TrickCommand;
89
import org.mangorage.mangobotsite.website.impl.ObjectMap;
910
import org.mangorage.mangobotsite.website.impl.StandardHttpServlet;
1011
import org.mangorage.mangobotsite.website.util.MapBuilder;
1112
import org.mangorage.mangobotsite.website.util.WebConstants;
1213
import java.io.IOException;
1314
import java.time.Instant;
15+
import java.util.Comparator;
1416
import java.util.Date;
1517

1618
import static org.mangorage.mangobotsite.website.util.WebUtil.processTemplate;
@@ -118,6 +120,9 @@ protected void doGet(HttpServletRequest req, HttpServletResponse resp) throws Se
118120
if (guildId != null) {
119121
b.put("tricks",
120122
command.getTricksForGuild(Long.parseLong(guildId))
123+
.stream()
124+
.sorted(Comparator.comparing(Trick::getTrickID))
125+
.toList()
121126
);
122127
}
123128

0 commit comments

Comments
 (0)