public enum ServerVersion extends Enum<ServerVersion>
| Enum Constant and Description |
|---|
UNKNOWN |
V1_10_R1 |
V1_11_R1 |
V1_12_R1 |
V1_13_R1
New versions
|
V1_13_R2 |
V1_14_R1 |
V1_15_R1 |
V1_16_R1 |
V1_8_R1
Legacy versions
|
V1_8_R2 |
V1_8_R3 |
V1_9_R1 |
V1_9_R2 |
| Modifier and Type | Field and Description |
|---|---|
static ServerVersion |
CURRENT_VERSION |
static String |
NMS_VERSION |
static String |
PACKAGE_NAME |
| Modifier and Type | Method and Description |
|---|---|
static ServerVersion |
getByNmsName(String name)
Gets a version from the NMS name
|
boolean |
isLegacy()
Checks if the server is using a legacy version
|
boolean |
isNewerThan(ServerVersion version)
Checks if the current version is newer than the
ServerVersion specified |
boolean |
isOlderThan(ServerVersion version)
Checks if the current version is older than the
ServerVersion specified |
static ServerVersion |
valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static ServerVersion[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final ServerVersion UNKNOWN
public static final ServerVersion V1_8_R1
public static final ServerVersion V1_8_R2
public static final ServerVersion V1_8_R3
public static final ServerVersion V1_9_R1
public static final ServerVersion V1_9_R2
public static final ServerVersion V1_10_R1
public static final ServerVersion V1_11_R1
public static final ServerVersion V1_12_R1
public static final ServerVersion V1_13_R1
public static final ServerVersion V1_13_R2
public static final ServerVersion V1_14_R1
public static final ServerVersion V1_15_R1
public static final ServerVersion V1_16_R1
public static final String PACKAGE_NAME
public static final String NMS_VERSION
public static final ServerVersion CURRENT_VERSION
public static ServerVersion[] values()
for (ServerVersion c : ServerVersion.values()) System.out.println(c);
public static ServerVersion valueOf(String name)
name - the name of the enum constant to be returned.IllegalArgumentException - if this enum type has no constant with the specified nameNullPointerException - if the argument is nullpublic boolean isNewerThan(ServerVersion version)
ServerVersion specifiedversion - The ServerVersion to check frompublic boolean isOlderThan(ServerVersion version)
ServerVersion specifiedversion - The ServerVersion to check frompublic boolean isLegacy()
public static ServerVersion getByNmsName(String name)
name - The NMS nameServerVersion that represents that versionCopyright © 2020. All rights reserved.