Fixed error

This commit is contained in:
Andrew 2013-08-09 05:56:13 +12:00
parent ea5547a6c6
commit e80523c59f

@ -80,7 +80,7 @@ public class DisguiseAPI {
* - The disguise to wear * - The disguise to wear
*/ */
public static void disguiseToAll(Entity entity, Disguise disguise) { public static void disguiseToAll(Entity entity, Disguise disguise) {
if (disguise == null) if (entity == null || disguise == null)
return; return;
Disguise oldDisguise = getDisguise(entity); Disguise oldDisguise = getDisguise(entity);
DisguisedEvent event = new DisguisedEvent(entity, disguise); DisguisedEvent event = new DisguisedEvent(entity, disguise);
@ -132,6 +132,8 @@ public class DisguiseAPI {
* @return Disguise * @return Disguise
*/ */
public static Disguise getDisguise(Entity disguiser) { public static Disguise getDisguise(Entity disguiser) {
if (disguiser == null)
return null;
return disguises.get(disguiser.getEntityId()); return disguises.get(disguiser.getEntityId());
} }