Archiviert
13
0

Fix 1.8 compatibility (#339)

Use proper method name ('setLenient' instead of 'setLenienent') in the deserializeLegacy method for 1.8 compatibility.
Dieser Commit ist enthalten in:
dadus33 2017-05-29 19:59:01 +03:00 committet von Dan Mulloy
Ursprung ea7900d64f
Commit 6bb169ac01

Datei anzeigen

@ -47,7 +47,7 @@ public class ComponentParser {
try {
Class<?> readerClass = Class.forName("org.bukkit.craftbukkit.libs.com.google.gson.stream.JsonReader");
Object reader = readerClass.getConstructor(Reader.class).newInstance(str);
Method setLenient = readerClass.getMethod("setLenienent", boolean.class);
Method setLenient = readerClass.getMethod("setLenient", boolean.class);
setLenient.invoke(reader, true);
Method getAdapter = gson.getClass().getMethod("getAdapter", Class.class);
Object adapter = getAdapter.invoke(gson, component);