Fix push events with listeners

This commit is contained in:
fullwall 2021-01-17 07:05:35 +08:00
parent 5821416f90
commit e6eac4e675
1 changed files with 1 additions and 1 deletions

View File

@ -59,7 +59,7 @@ public class Util {
// doing anything if the event is cancelled.
Vector vector = new Vector(x, y, z);
NPCPushEvent event = new NPCPushEvent(npc, vector);
event.setCancelled(allowed);
event.setCancelled(!allowed);
Bukkit.getPluginManager().callEvent(event);
return !event.isCancelled() ? event.getCollisionVector() : null;
}