13
0
geforkt von Mirrors/Velocity

Fix formatting in ProtocolVersion

Dieser Commit ist enthalten in:
Andrew Steinborn 2018-12-07 17:24:56 -05:00
Ursprung ce6b061b79
Commit 853fd2226d

Datei anzeigen

@ -1,17 +1,15 @@
package com.velocitypowered.api.network;
import com.google.common.collect.ImmutableMap;
import com.velocitypowered.api.proxy.server.ServerInfo;
import java.util.HashMap;
import java.util.Map;
/**
* Represents each Minecraft protocol version
* Represents each Minecraft protocol version.
*/
public enum ProtocolVersion {
UNKNOWN(-1, "Unknown"),
LEGACY(-1, "Legacy"),
LEGACY(-2, "Legacy"),
MINECRAFT_1_8(47, "1.8"),
MINECRAFT_1_9(107, "1.9"),
MINECRAFT_1_9_1(108, "1.9.1"),
@ -31,21 +29,22 @@ public enum ProtocolVersion {
private final String name;
/**
* Represents the lowest supported version
* Represents the lowest supported version.
*/
public static final ProtocolVersion MINIMUM_VERSION = MINECRAFT_1_8;
/**
* Represents the highest supported version
* Represents the highest supported version.
*/
public static final ProtocolVersion MAXIMUM_VERSION = MINECRAFT_1_13_2;
/**
* The user-friendly representation of the lowest and highest supported versions
* The user-friendly representation of the lowest and highest supported versions.
*/
public static final String SUPPORTED_VERSION_STRING = String.format("%s-%s", MINIMUM_VERSION, MAXIMUM_VERSION);
public static final String SUPPORTED_VERSION_STRING = String
.format("%s-%s", MINIMUM_VERSION, MAXIMUM_VERSION);
/**
* A map linking the protocol version number to its {@link ProtocolVersion} representation
* A map linking the protocol version number to its {@link ProtocolVersion} representation.
*/
public static final ImmutableMap<Integer, ProtocolVersion> ID_TO_PROTOCOL_CONSTANT;
@ -64,7 +63,7 @@ public enum ProtocolVersion {
}
/**
* Returns the protocol as an int
* Returns the protocol as an int.
*
* @return the protocol version
*/
@ -73,7 +72,7 @@ public enum ProtocolVersion {
}
/**
* Returns the user-friendly name for this protocol
* Returns the user-friendly name for this protocol.
*
* @return the protocol name
*/
@ -82,7 +81,7 @@ public enum ProtocolVersion {
}
/**
* Gets the {@link ProtocolVersion} for the given protocol
* Gets the {@link ProtocolVersion} for the given protocol.
*
* @param protocol the protocol as an int
* @return the protocol version
@ -92,7 +91,7 @@ public enum ProtocolVersion {
}
/**
* Returns whether the protocol is supported
* Returns whether the protocol is supported.
*
* @param protocol the protocol as an int
* @return if the protocol supported
@ -104,7 +103,7 @@ public enum ProtocolVersion {
}
/**
* Returns whether the {@link ProtocolVersion} is supported
* Returns whether the {@link ProtocolVersion} is supported.
*
* @param version the protocol version
* @return if the protocol supported
@ -114,7 +113,7 @@ public enum ProtocolVersion {
}
/**
* Returns whether this {@link ProtocolVersion} is unknown to the proxy
* Returns whether this {@link ProtocolVersion} is unknown to the proxy.
*
* @return if the protocol is unknown
*/
@ -123,7 +122,7 @@ public enum ProtocolVersion {
}
/**
* Returns whether this {@link ProtocolVersion} is a legacy protocol
* Returns whether this {@link ProtocolVersion} is a legacy protocol.
*
* @return if the protocol is legacy
*/