Skip to content

Commit

Permalink
Fix push events with listeners
Browse files Browse the repository at this point in the history
  • Loading branch information
fullwall committed Jan 16, 2021
1 parent 5821416 commit e6eac4e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion main/src/main/java/net/citizensnpcs/util/Util.java
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ public static Vector callPushEvent(NPC npc, double x, double y, double z) {
// 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;
}
Expand Down

0 comments on commit e6eac4e

Please sign in to comment.