Partially revert https://github.com/retrooper/packetevents/commit/5d1371c479c9811b87cc87a225063498654c96fe
This commit is contained in:
1 parent
9d98af54e6
commit
362d021745
1 file changed
+4
-5
@@ -49,7 +49,7 @@ public enum ServerVersion {
|
||||
.replace(".", ",").split(",")[3];
|
||||
private static final ServerVersion[] VALUES = values();
|
||||
public static ServerVersion[] reversedValues = new ServerVersion[VALUES.length];
|
||||
private static final ServerVersion cachedVersion;
|
||||
private static ServerVersion cachedVersion;
|
||||
private final short protocolVersion;
|
||||
|
||||
ServerVersion(short protocolId) {
|
||||
@@ -94,13 +94,12 @@ public enum ServerVersion {
|
||||
* @return Server Version. (always cached)
|
||||
*/
|
||||
public static ServerVersion getVersion() {
|
||||
if (cachedVersion == null) {
|
||||
cachedVersion = getVersionNoCache();
|
||||
}
|
||||
return cachedVersion;
|
||||
}
|
||||
|
||||
static {
|
||||
cachedVersion = getVersionNoCache();
|
||||
}
|
||||
|
||||
/**
|
||||
* The values in this enum in reverse.
|
||||
*
|
||||
|
||||
Reference in new issue
Block a user