mirror of
https://github.com/dmulloy2/ProtocolLib.git
synced 2024-12-26 19:18:12 +01:00
Restore compatibility with 1.8
This commit is contained in:
parent
d96ed73e82
commit
16111449b4
@ -111,8 +111,8 @@ public class NettyProtocolRegistry {
|
||||
private synchronized void initialize() {
|
||||
Object[] protocols = enumProtocol.getEnumConstants();
|
||||
|
||||
// TODO: Fins a better less than 1.7 check
|
||||
if (MinecraftVersion.getCurrentVersion().compareTo(MinecraftVersion.BOUNTIFUL_UPDATE) <= 0) {
|
||||
// TODO: Find a better less than 1.7 check
|
||||
if (MinecraftVersion.getCurrentVersion().compareTo(MinecraftVersion.BOUNTIFUL_UPDATE) < 0) {
|
||||
initialize17();
|
||||
return;
|
||||
}
|
||||
|
@ -74,7 +74,6 @@ import com.comphenix.protocol.wrappers.nbt.NbtFactory;
|
||||
import com.comphenix.protocol.wrappers.nbt.NbtType;
|
||||
import com.google.common.base.Joiner;
|
||||
import com.google.common.collect.Maps;
|
||||
import com.google.gson.Gson;
|
||||
import com.mojang.authlib.GameProfile;
|
||||
|
||||
/**
|
||||
@ -1695,7 +1694,11 @@ public class MinecraftReflection {
|
||||
* @return The GSON class.
|
||||
*/
|
||||
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");
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
Loading…
Reference in New Issue
Block a user