mirror of
https://github.com/CitizensDev/Citizens2.git
synced 2025-01-24 09:02:01 +01:00
Also cancel push event if not collidable
This commit is contained in:
parent
c68ba08f9d
commit
002b2b61ff
@ -46,7 +46,8 @@ public class Util {
|
||||
|
||||
public static NPCPushEvent callPushEvent(NPC npc, Vector vector) {
|
||||
NPCPushEvent event = new NPCPushEvent(npc, vector);
|
||||
event.setCancelled(npc.data().get(NPC.DEFAULT_PROTECTED_METADATA, true));
|
||||
event.setCancelled(
|
||||
npc.data().get(NPC.DEFAULT_PROTECTED_METADATA, true) || !npc.data().get(NPC.COLLIDABLE_METADATA, true));
|
||||
Bukkit.getPluginManager().callEvent(event);
|
||||
return event;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user