Skip to content
Permalink
Browse files

Prevent bad respawns, fixes #48

  • Loading branch information...
mcmonkey4eva committed Aug 1, 2016
1 parent ef4b644 commit 1449a470f014a85551b2865df4e55e1c5df9018d
Showing with 4 additions and 0 deletions.
  1. +4 −0 src/main/java/org/mcmonkey/sentinel/SentinelTrait.java
@@ -8,6 +8,7 @@
import net.citizensnpcs.api.trait.Trait;
import net.citizensnpcs.api.trait.trait.Inventory;
import net.citizensnpcs.api.trait.trait.Owner;
import net.citizensnpcs.api.trait.trait.Spawned;
import net.citizensnpcs.trait.waypoint.Waypoint;
import net.citizensnpcs.trait.waypoint.WaypointProvider;
import net.citizensnpcs.trait.waypoint.Waypoints;
@@ -1453,6 +1454,9 @@ public void whenSomethingDies(EntityDeathEvent event) {
}

public void onDeath() {
if (npc.hasTrait(Spawned.class)) {
npc.getTrait(Spawned.class).setSpawned(false);
}
greetedAlready.clear();
currentTargets.clear();
if (respawnTime < 0) {

0 comments on commit 1449a47

Please sign in to comment.
You can’t perform that action at this time.