From e80523c59f81af8df3331cb3e148983731a77f88 Mon Sep 17 00:00:00 2001 From: Andrew Date: Fri, 9 Aug 2013 05:56:13 +1200 Subject: [PATCH] Fixed error --- src/me/libraryaddict/disguise/DisguiseAPI.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/me/libraryaddict/disguise/DisguiseAPI.java b/src/me/libraryaddict/disguise/DisguiseAPI.java index 1af4ee5e..c92e8aac 100644 --- a/src/me/libraryaddict/disguise/DisguiseAPI.java +++ b/src/me/libraryaddict/disguise/DisguiseAPI.java @@ -80,7 +80,7 @@ public class DisguiseAPI { * - The disguise to wear */ public static void disguiseToAll(Entity entity, Disguise disguise) { - if (disguise == null) + if (entity == null || disguise == null) return; Disguise oldDisguise = getDisguise(entity); DisguisedEvent event = new DisguisedEvent(entity, disguise); @@ -132,6 +132,8 @@ public class DisguiseAPI { * @return Disguise */ public static Disguise getDisguise(Entity disguiser) { + if (disguiser == null) + return null; return disguises.get(disguiser.getEntityId()); }