Let them get the event. But just don't let cancel do anything
This commit is contained in:
parent
ec96bdd962
commit
1e8206baa5
@ -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) {
|
||||
|
Loading…
Reference in New Issue
Block a user