SPIGOT-5089: UnsupportedOperationException on setting villager memory to null

This commit is contained in:
md_5 2019-06-19 18:42:51 +10:00
parent 8003ced585
commit efd8a2b50a

View File

@ -22,7 +22,9 @@ public final class CraftMemoryMapper {
} }
public static Object toNms(Object object) { public static Object toNms(Object object) {
if (object instanceof Location) { if (object == null) {
return null;
} else if (object instanceof Location) {
return toNms((Location) object); return toNms((Location) object);
} }