Package com.hazebyte.crate.api
Class ServerVersion
- java.lang.Object
-
- com.hazebyte.crate.api.ServerVersion
-
- All Implemented Interfaces:
Comparable<ServerVersion>
public class ServerVersion extends Object implements Comparable<ServerVersion>
-
-
Field Summary
Fields Modifier and Type Field Description static ServerVersion
SERVER_MOCK
static ServerVersion
v1_10_R1
static ServerVersion
v1_12_R1
static ServerVersion
v1_13_R1
static ServerVersion
v1_14_R1
static ServerVersion
v1_16_R1
static ServerVersion
v1_20_R6
static ServerVersion
v1_21_R0
static ServerVersion
v1_8_R1
static ServerVersion
v1_8_R2
static ServerVersion
v1_9_R1
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description int
compareTo(ServerVersion serverVersion)
boolean
equals(Object obj)
int
getMajor()
int
getMinor()
int
getRevision()
static ServerVersion
getVersion()
Returns the current running server version.boolean
gt(ServerVersion version)
Returns true if the calling server version is greater than the parameter.boolean
gte(ServerVersion version)
Returns true if the calling server version is greater than or equal to the parameter.int
hashCode()
boolean
isMockServer()
static boolean
isMockServer(String versionString)
boolean
lt(ServerVersion version)
Returns true if the calling server version is less than the parameter.boolean
lte(ServerVersion version)
Returns true if the calling server version is less than or equal to the parameter.static ServerVersion
of(String versionString)
1.20.6 => Major (1), Minor (20), Revision (6)String
toString()
-
-
-
Field Detail
-
v1_8_R1
public static ServerVersion v1_8_R1
-
v1_8_R2
public static ServerVersion v1_8_R2
-
v1_9_R1
public static ServerVersion v1_9_R1
-
v1_10_R1
public static ServerVersion v1_10_R1
-
v1_12_R1
public static ServerVersion v1_12_R1
-
v1_13_R1
public static ServerVersion v1_13_R1
-
v1_14_R1
public static ServerVersion v1_14_R1
-
v1_16_R1
public static ServerVersion v1_16_R1
-
v1_20_R6
public static ServerVersion v1_20_R6
-
v1_21_R0
public static ServerVersion v1_21_R0
-
SERVER_MOCK
public static ServerVersion SERVER_MOCK
-
-
Method Detail
-
isMockServer
public static boolean isMockServer(String versionString)
-
isMockServer
public boolean isMockServer()
-
of
public static ServerVersion of(String versionString)
1.20.6 => Major (1), Minor (20), Revision (6)- Returns:
- the server version
-
getVersion
public static ServerVersion getVersion()
Returns the current running server version.
-
gt
public boolean gt(ServerVersion version)
Returns true if the calling server version is greater than the parameter.
-
gte
public boolean gte(ServerVersion version)
Returns true if the calling server version is greater than or equal to the parameter.
-
lt
public boolean lt(ServerVersion version)
Returns true if the calling server version is less than the parameter.
-
lte
public boolean lte(ServerVersion version)
Returns true if the calling server version is less than or equal to the parameter.
-
compareTo
public int compareTo(ServerVersion serverVersion)
- Specified by:
compareTo
in interfaceComparable<ServerVersion>
-
getMajor
public int getMajor()
-
getMinor
public int getMinor()
-
getRevision
public int getRevision()
-
-