mirror of
https://github.com/CitizensDev/Citizens2.git
synced 2025-01-24 17:11:31 +01:00
Null check entity in death event
This commit is contained in:
parent
3c314c1d3e
commit
a9b85961a9
@ -250,9 +250,9 @@ public class ProtocolLibListener implements Listener {
|
||||
|
||||
@EventHandler(ignoreCancelled = true)
|
||||
public void onNPCDespawn(NPCDespawnEvent event) {
|
||||
if (event.getNPC().getEntity() != null) {
|
||||
rotationTraits.remove(event.getNPC().getEntity().getEntityId());
|
||||
}
|
||||
if (event.getNPC().getEntity() == null)
|
||||
return;
|
||||
rotationTraits.remove(event.getNPC().getEntity().getEntityId());
|
||||
mirrorTraits.remove(event.getNPC().getEntity().getUniqueId());
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user