From ae199ad98a5479de564ac707e2247d436d89e5a2 Mon Sep 17 00:00:00 2001 From: fullwall Date: Wed, 21 Nov 2012 20:22:59 +0800 Subject: [PATCH] Location-safe --- src/main/java/net/citizensnpcs/trait/CurrentLocation.java | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/main/java/net/citizensnpcs/trait/CurrentLocation.java b/src/main/java/net/citizensnpcs/trait/CurrentLocation.java index 521b9f2de..290d1b35b 100644 --- a/src/main/java/net/citizensnpcs/trait/CurrentLocation.java +++ b/src/main/java/net/citizensnpcs/trait/CurrentLocation.java @@ -14,6 +14,8 @@ public class CurrentLocation extends Trait { } public Location getLocation() { + if (loc.getWorld() == null) + return null; return loc; }