Restore compatibility with 1.8

This commit is contained in:
Dan Mulloy 2015-03-31 19:31:11 -04:00
parent d96ed73e82
commit 16111449b4
2 changed files with 7 additions and 4 deletions

View File

@ -111,8 +111,8 @@ public class NettyProtocolRegistry {
private synchronized void initialize() { private synchronized void initialize() {
Object[] protocols = enumProtocol.getEnumConstants(); Object[] protocols = enumProtocol.getEnumConstants();
// TODO: Fins a better less than 1.7 check // TODO: Find a better less than 1.7 check
if (MinecraftVersion.getCurrentVersion().compareTo(MinecraftVersion.BOUNTIFUL_UPDATE) <= 0) { if (MinecraftVersion.getCurrentVersion().compareTo(MinecraftVersion.BOUNTIFUL_UPDATE) < 0) {
initialize17(); initialize17();
return; return;
} }

View File

@ -74,7 +74,6 @@ import com.comphenix.protocol.wrappers.nbt.NbtFactory;
import com.comphenix.protocol.wrappers.nbt.NbtType; import com.comphenix.protocol.wrappers.nbt.NbtType;
import com.google.common.base.Joiner; import com.google.common.base.Joiner;
import com.google.common.collect.Maps; import com.google.common.collect.Maps;
import com.google.gson.Gson;
import com.mojang.authlib.GameProfile; import com.mojang.authlib.GameProfile;
/** /**
@ -1695,7 +1694,11 @@ public class MinecraftReflection {
* @return The GSON class. * @return The GSON class.
*/ */
public static Class<?> getMinecraftGsonClass() { public static Class<?> getMinecraftGsonClass() {
return Gson.class; try {
return getClass("com.google.gson.Gson");
} catch (RuntimeException e) {
return getClass("org.bukkit.craftbukkit.libs.com.google.gson.Gson");
}
} }
/** /**