diff --git a/core/src/mindustry/net/ServerGroup.java b/core/src/mindustry/net/ServerGroup.java index 694058f0503d..d8d480f935e4 100644 --- a/core/src/mindustry/net/ServerGroup.java +++ b/core/src/mindustry/net/ServerGroup.java @@ -24,10 +24,18 @@ public boolean hidden(){ return Core.settings.getBool(key() + "-hidden", false); } + public boolean favorite(){ + return Core.settings.getBool(key() + "-favorite", false); + } + public void setHidden(boolean hidden){ Core.settings.put(key() + "-hidden", hidden); } + public void setFavorite(boolean favorite){ + Core.settings.put(key() + "-favorite", favorite); + } + String key(){ return "server-" + (name.isEmpty() ? addresses.length == 0 ? "" : addresses[0] : name); } diff --git a/core/src/mindustry/ui/dialogs/JoinDialog.java b/core/src/mindustry/ui/dialogs/JoinDialog.java index 3ca05b6c561e..b7f8b6055e5c 100644 --- a/core/src/mindustry/ui/dialogs/JoinDialog.java +++ b/core/src/mindustry/ui/dialogs/JoinDialog.java @@ -407,6 +407,8 @@ void refreshCommunity(){ if(group.prioritized){ addHeader(groupTable, group, hidden, false); + } else if (group.favorite()) { + addHeader(groupTable, group, hidden, true); } //table containing all groups for(String address : group.addresses){