public static class MinecraftVersions.Update extends java.lang.Object implements java.lang.Comparable<MinecraftVersions.Update>
| Constructor and Description |
|---|
Update(int major,
int minor,
@NotNull java.util.function.Consumer<MinecraftVersions.Update> init)
Creates a new Update instance.
|
Update(int major,
int minor,
@NotNull java.util.List<MinecraftVersions.Version> versions) |
| Modifier and Type | Method and Description |
|---|---|
int |
compareTo(@NotNull MinecraftVersions.Update other) |
boolean |
equals(java.lang.Object o) |
@NotNull MinecraftVersions.Version |
get(int patch)
Gets a specific Version object for this Update.
|
int |
getMajor()
Returns the major version, always 1.
|
int |
getMinor()
Returns the minor version.
|
int |
hashCode() |
boolean |
isAbove()
Returns true if the server update is newer than this update.
|
boolean |
isAtLeast()
Returns true if the server update is at least this update.
|
boolean |
isAtMost()
Returns true if the server update is at most this update.
|
boolean |
isBelow()
Returns true if the server update is older than this update.
|
boolean |
isCurrent()
Returns true if the server update equals this update.
|
@NotNull java.lang.String |
toString() |
public Update(int major,
int minor,
@NotNull
@NotNull java.util.List<MinecraftVersions.Version> versions)
public Update(int major,
int minor,
@NotNull
@NotNull java.util.function.Consumer<MinecraftVersions.Update> init)
major - The major version. Always 1.minor - The minor version.init - A Consumer to initialize the versions for this update.public int getMajor()
public int getMinor()
public boolean isCurrent()
public boolean isAbove()
public boolean isAtLeast()
public boolean isBelow()
public boolean isAtMost()
@NotNull public @NotNull MinecraftVersions.Version get(int patch)
patch - The patch number.java.lang.IllegalArgumentException - if no such version existspublic int compareTo(@NotNull
@NotNull MinecraftVersions.Update other)
compareTo in interface java.lang.Comparable<MinecraftVersions.Update>public boolean equals(java.lang.Object o)
equals in class java.lang.Objectpublic int hashCode()
hashCode in class java.lang.Object@NotNull public @NotNull java.lang.String toString()
toString in class java.lang.Object