diff --git a/src/me/libraryaddict/disguise/DisguiseAPI.java b/src/me/libraryaddict/disguise/DisguiseAPI.java index 1cd095f9..e235379a 100644 --- a/src/me/libraryaddict/disguise/DisguiseAPI.java +++ b/src/me/libraryaddict/disguise/DisguiseAPI.java @@ -106,7 +106,7 @@ public class DisguiseAPI { setupPlayerFakeDisguise(disguise); // Discard the disguise if (oldDisguise != null) - oldDisguise.discard(); + oldDisguise.removeDisguise(); } /** @@ -368,7 +368,7 @@ public class DisguiseAPI { Bukkit.getPluginManager().callEvent(event); if (event.isCancelled()) return; - disguise.discard(); + disguise.removeDisguise(); } public HashMap getDisguises() { diff --git a/src/me/libraryaddict/disguise/DisguiseTypes/Disguise.java b/src/me/libraryaddict/disguise/DisguiseTypes/Disguise.java index f1f72b95..e3872b26 100644 --- a/src/me/libraryaddict/disguise/DisguiseTypes/Disguise.java +++ b/src/me/libraryaddict/disguise/DisguiseTypes/Disguise.java @@ -205,18 +205,14 @@ public class Disguise { } /** - * Destroys the disguise and undisguises the entity if its using this disguise. This doesn't fire a UndisguiseEvent + * Removes the disguise and undisguises the entity if its using this disguise. This doesn't fire a UndisguiseEvent */ - public void discard() { - // If the runnable is null. Just return. Its been discarded already. - if (runnable == null) - return; + public void removeDisguise() { // Why the hell can't I safely check if its running?!?! try { runnable.cancel(); } catch (Exception ex) { } - runnable = null; HashMap disguises = disguiseAPI.getDisguises(); // If this disguise has a entity set if (getEntity() != null) {