Avoid NPE with Locations in config files.

This commit is contained in:
garbagemule 2013-08-16 05:31:32 +02:00
parent 8793bd6cef
commit a2328c7271

View File

@ -98,6 +98,10 @@ public class ConfigUtils
}
public static void setLocation(ConfigurationSection config, String path, Location location) {
if (location == null) {
config.set(path, null);
return;
}
String x = twoPlaces(location.getX());
String y = twoPlaces(location.getY());
String z = twoPlaces(location.getZ());