mirror of
https://github.com/CitizensDev/Citizens2.git
synced 2025-02-27 09:42:37 +01:00
Fix condition in entityportalevent
This commit is contained in:
parent
4b4b0b7803
commit
7d10e25da5
@ -311,7 +311,7 @@ public class EventListen implements Listener {
|
||||
@EventHandler
|
||||
public void onEntityPortal(EntityPortalEvent event) {
|
||||
NPC npc = CitizensAPI.getNPCRegistry().getNPC(event.getEntity());
|
||||
if (npc == null && event.getEntityType() != EntityType.PLAYER)
|
||||
if (npc == null || event.getEntityType() != EntityType.PLAYER)
|
||||
return;
|
||||
event.setCancelled(true);
|
||||
npc.despawn(DespawnReason.PENDING_RESPAWN);
|
||||
|
Loading…
Reference in New Issue
Block a user