Restore backwards compatibility with server pings
I don't know why people are using 1.8.1, but whatever
Dieser Commit ist enthalten in:
Ursprung
b17af68716
Commit
0c705ef59d
@ -1652,18 +1652,24 @@ public class MinecraftReflection {
|
|||||||
return getMinecraftClass("TileEntity");
|
return getMinecraftClass("TileEntity");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private static Class<?> gsonClass = null;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Retrieve the Gson class used by Minecraft.
|
* Retrieve the Gson class used by Minecraft.
|
||||||
* @return The GSON class.
|
* @return The Gson class.
|
||||||
*/
|
*/
|
||||||
public static Class<?> getMinecraftGsonClass() {
|
public static Class<?> getMinecraftGsonClass() {
|
||||||
|
if (gsonClass == null) {
|
||||||
try {
|
try {
|
||||||
return getClass("com.google.gson.Gson");
|
return gsonClass = getClass("org.bukkit.craftbukkit.libs.com.google.gson.Gson");
|
||||||
} catch (RuntimeException e) {
|
} catch (RuntimeException e) {
|
||||||
return getClass("org.bukkit.craftbukkit.libs.com.google.gson.Gson");
|
return gsonClass = getClass("com.google.gson.Gson");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
return gsonClass;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Retrieve the ItemStack[] class.
|
* Retrieve the ItemStack[] class.
|
||||||
* @return The ItemStack[] class.
|
* @return The ItemStack[] class.
|
||||||
|
In neuem Issue referenzieren
Einen Benutzer sperren