Let them get the event. But just don't let cancel do anything

This commit is contained in:
Andrew 2013-08-12 07:25:48 +12:00
parent ec96bdd962
commit 1e8206baa5

View File

@ -604,12 +604,10 @@ public class DisguiseAPI {
Disguise disguise = getDisguise(entity);
if (disguise == null)
return;
if (((CraftEntity) entity).getHandle().valid) {
UndisguiseEvent event = new UndisguiseEvent(entity, disguise);
Bukkit.getPluginManager().callEvent(event);
if (event.isCancelled())
return;
}
UndisguiseEvent event = new UndisguiseEvent(entity, disguise);
Bukkit.getPluginManager().callEvent(event);
if (event.isCancelled() && ((CraftEntity) entity).getHandle().valid)
return;
disguise.getScheduler().cancel();
disguises.remove(entity.getEntityId());
if (((CraftEntity) entity).getHandle().valid) {