mirror of
https://github.com/TotalFreedomMC/TF-LibsDisguises.git
synced 2025-02-11 11:40:29 +00:00
Let them get the event. But just don't let cancel do anything
This commit is contained in:
parent
ec96bdd962
commit
1e8206baa5
1 changed files with 4 additions and 6 deletions
|
@ -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 a new issue