mirror of
https://github.com/CitizensDev/Citizens2.git
synced 2024-11-26 20:55:44 +01:00
Fix push events with listeners
This commit is contained in:
parent
5821416f90
commit
e6eac4e675
@ -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;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user