Skip to content
This repository has been archived by the owner on Dec 23, 2024. It is now read-only.

Commit

Permalink
ignore modded
Browse files Browse the repository at this point in the history
  • Loading branch information
DAMcraft committed Nov 22, 2023
1 parent 2917491 commit 9f9e07f
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -225,6 +225,13 @@ public enum GeoSearchType {
.build()
);

private final Setting<Boolean> ignoreModded = sg.add(new BoolSetting.Builder()
.name("ignore-modded")
.description("Will not give you servers where mods have been detected")
.defaultValue(true)
.build()
);

private final Setting<GeoSearchType> geoSearchTypeSetting = sg.add(new EnumSetting.Builder<GeoSearchType>()
.name("geo-search-type")
.description("Whether to search by ASN or country code")
Expand Down Expand Up @@ -322,6 +329,7 @@ public void initWidgets() {
}

if (!onlineOnlySetting.get()) request.setOnlineAfter(0);
if (ignoreModded.get()) request.setIgnoreModded(true);


this.locked = true;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@ public class ServersRequest {
private Integer online_after;
private JsonArray online_players;
private Integer protocol;
private Boolean ignore_modded;

public enum Software {
Any,
Bukkit,
Expand Down Expand Up @@ -86,6 +88,10 @@ public void setSoftware(Software software) {
this.software = software;
}

public void setIgnoreModded(Boolean ignore) {
this.ignore_modded = ignore;
}

public String json() {
return gson.toJson(this);
}
Expand Down

0 comments on commit 9f9e07f

Please sign in to comment.