Replace literal numbers with usages of the ProtocolConstants class.

This commit is contained in:
md_5
2014-04-16 10:18:16 +10:00
parent 994a996981
commit bc2b4db419
6 changed files with 21 additions and 8 deletions

View File

@@ -93,7 +93,7 @@ public enum Protocol
};
/*========================================================================*/
public static final int MAX_PACKET_ID = 0xFF;
public static List<Integer> supportedVersions = Arrays.asList( 4, 5, 8 );
public static List<Integer> supportedVersions = Arrays.asList( ProtocolConstants.MINECRAFT_1_7_2, ProtocolConstants.MINECRAFT_1_7_6 );
/*========================================================================*/
public final ProtocolDirection TO_SERVER = new ProtocolDirection( "TO_SERVER" );
public final ProtocolDirection TO_CLIENT = new ProtocolDirection( "TO_CLIENT" );

View File

@@ -0,0 +1,9 @@
package net.md_5.bungee.protocol;
public class ProtocolConstants
{
public static int MINECRAFT_1_7_2 = 4;
public static int MINECRAFT_1_7_6 = 5;
public static int MINECRAFT_14_11_a = 14;
}