Skip to content

Commit 9889fd0

Browse files
committed
remove update() API, it didn't work anyway
1 parent 5c23509 commit 9889fd0

File tree

1 file changed

+0
-23
lines changed

1 file changed

+0
-23
lines changed

src/main/java/com/namelessmc/java_api/Website.java

Lines changed: 0 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@
55
import com.namelessmc.java_api.exception.NamelessException;
66
import com.namelessmc.java_api.exception.UnknownNamelessVersionException;
77
import com.namelessmc.java_api.modules.NamelessModule;
8-
import org.checkerframework.checker.nullness.qual.Nullable;
98

109
import java.util.Set;
1110
import java.util.stream.Collectors;
@@ -14,7 +13,6 @@
1413
public class Website implements LanguageEntity {
1514

1615
private final String version;
17-
private final @Nullable Update update;
1816
private final Set<NamelessModule> modules;
1917
private final String rawLanguage;
2018

@@ -33,20 +31,6 @@ public class Website implements LanguageEntity {
3331
.map(NamelessModule::byName)
3432
.collect(Collectors.toUnmodifiableSet());
3533

36-
if (json.has("version_update") && false) {
37-
final JsonObject updateJson = json.get("version_update").getAsJsonObject();
38-
final boolean updateAvailable = updateJson.get("update").getAsBoolean();
39-
if (updateAvailable) {
40-
final String updateVersion = updateJson.get("version").getAsString();
41-
final boolean isUrgent = updateJson.get("urgent").getAsBoolean();
42-
this.update = new Update(isUrgent, updateVersion);
43-
} else {
44-
this.update = null;
45-
}
46-
} else {
47-
this.update = null;
48-
}
49-
5034
if (json.get("locale").isJsonNull()) {
5135
throw new NamelessException("Website returned null locale. This can happen if you upgraded from v2-pr12 to v2-pr13, please try switching the site's language to something else and back.");
5236
}
@@ -62,13 +46,6 @@ public NamelessVersion parsedVersion() throws UnknownNamelessVersionException {
6246
return NamelessVersion.parse(this.version);
6347
}
6448

65-
/**
66-
* @return Information about an update, or empty if no update is available.
67-
*/
68-
public @Nullable Update update() {
69-
return this.update;
70-
}
71-
7249
public Set<NamelessModule> modules() {
7350
return this.modules;
7451
}

0 commit comments

Comments
 (0)