mirror of
https://github.com/CitizensDev/Citizens2.git
synced 2024-12-23 01:27:33 +01:00
Fix player death from other entities
This commit is contained in:
parent
3fadac5840
commit
2d80f763eb
@ -141,9 +141,10 @@ public class EntityHumanNPC extends ServerPlayer implements NPCHolder, Skinnable
|
||||
Bukkit.getScheduler().runTaskLater(CitizensAPI.getPlugin(), new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
EntityHumanNPC.this.getLevel().removePlayerImmediately(EntityHumanNPC.this, RemovalReason.KILLED);
|
||||
((ServerLevel) level).getChunkProvider().removeEntity(EntityHumanNPC.this);
|
||||
}
|
||||
}, 35); // give enough time for death and smoke animation
|
||||
}, 15); // give enough time for death and smoke animation
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -30,16 +30,18 @@ public class PlayerPathfinder extends PathFinder {
|
||||
private final int maxVisitedNodes;
|
||||
private final Node[] neighbors = new Node[32];
|
||||
private final PlayerNodeEvaluator nodeEvaluator;
|
||||
private final BinaryHeap openSet = new BinaryHeap();
|
||||
private final BinaryHeap openSet;
|
||||
|
||||
public PlayerPathfinder() {
|
||||
super(null, 768);
|
||||
this.nodeEvaluator = new PlayerNodeEvaluator();
|
||||
this.openSet = new BinaryHeap();
|
||||
this.maxVisitedNodes = 768;
|
||||
}
|
||||
|
||||
public PlayerPathfinder(PlayerNodeEvaluator var0, int var1) {
|
||||
super(var0, var1);
|
||||
this.openSet = new BinaryHeap();
|
||||
this.nodeEvaluator = var0;
|
||||
this.maxVisitedNodes = var1;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user