From 4ec8a3c2802b2d6279e883f64ea47dac042f305d 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; }