Update version strings + add constant

This commit is contained in:
MatrixTunnel
2018-08-06 16:06:57 -07:00
parent 6a5c40ecdf
commit ac378a8efa
3 changed files with 6 additions and 2 deletions

View File

@@ -4,6 +4,7 @@ import com.google.common.base.Preconditions;
import com.velocitypowered.proxy.VelocityServer;
import com.velocitypowered.proxy.config.VelocityConfiguration;
import com.velocitypowered.proxy.protocol.MinecraftPacket;
import com.velocitypowered.proxy.protocol.ProtocolConstants;
import com.velocitypowered.proxy.protocol.packet.StatusPing;
import com.velocitypowered.proxy.protocol.packet.StatusRequest;
import com.velocitypowered.proxy.protocol.packet.StatusResponse;
@@ -35,7 +36,7 @@ public class StatusSessionHandler implements MinecraftSessionHandler {
// Status request
ServerPing ping = new ServerPing(
new ServerPing.Version(connection.getProtocolVersion(), "Velocity 1.9-1.13"),
new ServerPing.Version(connection.getProtocolVersion(), "Velocity " + ProtocolConstants.SUPPORTED_GENERIC_VERSION_STRING),
new ServerPing.Players(0, configuration.getShowMaxPlayers()),
configuration.getMotdComponent(),
null

View File

@@ -17,6 +17,9 @@ public enum ProtocolConstants { ;
public static final int MINECRAFT_1_13 = 393;
public static final int MINIMUM_GENERIC_VERSION = MINECRAFT_1_8;
public static final int MAXIMUM_GENERIC_VERSION = MINECRAFT_1_13;
public static final String SUPPORTED_GENERIC_VERSION_STRING = "1.8-1.13";
public static final int[] SUPPORTED_VERSIONS = new int[] {
MINECRAFT_1_8,