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);
|
Disguise disguise = getDisguise(entity);
|
||||||
if (disguise == null)
|
if (disguise == null)
|
||||||
return;
|
return;
|
||||||
if (((CraftEntity) entity).getHandle().valid) {
|
|
||||||
UndisguiseEvent event = new UndisguiseEvent(entity, disguise);
|
UndisguiseEvent event = new UndisguiseEvent(entity, disguise);
|
||||||
Bukkit.getPluginManager().callEvent(event);
|
Bukkit.getPluginManager().callEvent(event);
|
||||||
if (event.isCancelled())
|
if (event.isCancelled() && ((CraftEntity) entity).getHandle().valid)
|
||||||
return;
|
return;
|
||||||
}
|
|
||||||
disguise.getScheduler().cancel();
|
disguise.getScheduler().cancel();
|
||||||
disguises.remove(entity.getEntityId());
|
disguises.remove(entity.getEntityId());
|
||||||
if (((CraftEntity) entity).getHandle().valid) {
|
if (((CraftEntity) entity).getHandle().valid) {
|
||||||
|
Loading…
Reference in New Issue
Block a user