Use ProtocolConstants instead of raw protocol numbers
This commit is contained in:
parent
6775b9230c
commit
6475385f87
@ -3,9 +3,9 @@ package net.md_5.bungee.protocol;
|
|||||||
public class ProtocolConstants
|
public class ProtocolConstants
|
||||||
{
|
{
|
||||||
|
|
||||||
public static int MINECRAFT_1_7_2 = 4;
|
public static final int MINECRAFT_1_7_2 = 4;
|
||||||
public static int MINECRAFT_1_7_6 = 5;
|
public static final int MINECRAFT_1_7_6 = 5;
|
||||||
public static int MINECRAFT_14_11_a = 14;
|
public static final int MINECRAFT_14_11_a = 14;
|
||||||
|
|
||||||
public enum Direction
|
public enum Direction
|
||||||
{
|
{
|
||||||
|
@ -25,11 +25,11 @@ public abstract class EntityMap
|
|||||||
{
|
{
|
||||||
switch ( version )
|
switch ( version )
|
||||||
{
|
{
|
||||||
case 4:
|
case ProtocolConstants.MINECRAFT_1_7_2:
|
||||||
return new EntityMap_1_7_2();
|
return new EntityMap_1_7_2();
|
||||||
case 5:
|
case ProtocolConstants.MINECRAFT_1_7_6:
|
||||||
return new EntityMap_1_7_6();
|
return new EntityMap_1_7_6();
|
||||||
case 14:
|
case ProtocolConstants.MINECRAFT_14_11_a:
|
||||||
return new EntityMap_14_11_a();
|
return new EntityMap_14_11_a();
|
||||||
}
|
}
|
||||||
throw new RuntimeException( "Version " + version + " has no entity map" );
|
throw new RuntimeException( "Version " + version + " has no entity map" );
|
||||||
|
Loading…
Reference in New Issue
Block a user