Server gui fixes

This commit is contained in:
cuftica 2023-07-26 21:51:23 +02:00
parent dc210c412c
commit 4eff81f493

View File

@ -43,7 +43,7 @@ public class SelectorGui {
List<ServerRecord> filteredServers = new ArrayList<>(records); List<ServerRecord> filteredServers = new ArrayList<>(records);
filteredServers.sort(Comparator.comparing(s -> s.online() ? 1 : 0)); filteredServers.sort(Comparator.comparing(s -> s.online() ? 0 : 1));
List<ServerRecord> filteredServersByPlayers = new ArrayList<>(filteredServers); List<ServerRecord> filteredServersByPlayers = new ArrayList<>(filteredServers);
@ -86,6 +86,7 @@ public class SelectorGui {
ItemStack item = itemBuilder ItemStack item = itemBuilder
.lore(online ? onlineLore : offlineLore) .lore(online ? onlineLore : offlineLore)
.skullOwner(server.name() == null ? "" : server.name())
.build(); .build();
menu.addButton(new SGButton(item).withListener( menu.addButton(new SGButton(item).withListener(