From 6475385f8745bb9f97acc0450900e7f608c96254 Mon Sep 17 00:00:00 2001 From: Thinkofdeath Date: Wed, 16 Apr 2014 14:57:09 +0100 Subject: [PATCH] Use ProtocolConstants instead of raw protocol numbers --- .../java/net/md_5/bungee/protocol/ProtocolConstants.java | 6 +++--- .../src/main/java/net/md_5/bungee/entitymap/EntityMap.java | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/protocol/src/main/java/net/md_5/bungee/protocol/ProtocolConstants.java b/protocol/src/main/java/net/md_5/bungee/protocol/ProtocolConstants.java index 6e3f7843..f0613f54 100644 --- a/protocol/src/main/java/net/md_5/bungee/protocol/ProtocolConstants.java +++ b/protocol/src/main/java/net/md_5/bungee/protocol/ProtocolConstants.java @@ -3,9 +3,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; + public static final int MINECRAFT_1_7_2 = 4; + public static final int MINECRAFT_1_7_6 = 5; + public static final int MINECRAFT_14_11_a = 14; public enum Direction { diff --git a/proxy/src/main/java/net/md_5/bungee/entitymap/EntityMap.java b/proxy/src/main/java/net/md_5/bungee/entitymap/EntityMap.java index 43c2e7d6..38e67077 100644 --- a/proxy/src/main/java/net/md_5/bungee/entitymap/EntityMap.java +++ b/proxy/src/main/java/net/md_5/bungee/entitymap/EntityMap.java @@ -25,11 +25,11 @@ public abstract class EntityMap { switch ( version ) { - case 4: + case ProtocolConstants.MINECRAFT_1_7_2: return new EntityMap_1_7_2(); - case 5: + case ProtocolConstants.MINECRAFT_1_7_6: return new EntityMap_1_7_6(); - case 14: + case ProtocolConstants.MINECRAFT_14_11_a: return new EntityMap_14_11_a(); } throw new RuntimeException( "Version " + version + " has no entity map" );