mirror of
https://github.com/garbagemule/MobArena.git
synced 2024-11-23 11:06:14 +01:00
Avoid NPE with Locations in config files.
This commit is contained in:
parent
8793bd6cef
commit
a2328c7271
@ -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());
|
||||
|
Loading…
Reference in New Issue
Block a user