Fix wither crash

This commit is contained in:
fullwall 2017-01-17 16:08:33 +08:00
parent db418648ab
commit 226470d743
2 changed files with 6 additions and 6 deletions

View File

@ -2,15 +2,15 @@ package net.citizensnpcs.trait.waypoint.triggers;
import java.util.Map; import java.util.Map;
import net.citizensnpcs.api.persistence.PersistenceLoader;
import net.citizensnpcs.api.persistence.Persister;
import net.citizensnpcs.api.util.DataKey;
import org.bukkit.conversations.Prompt; import org.bukkit.conversations.Prompt;
import com.google.common.base.Joiner; import com.google.common.base.Joiner;
import com.google.common.collect.Maps; import com.google.common.collect.Maps;
import net.citizensnpcs.api.persistence.PersistenceLoader;
import net.citizensnpcs.api.persistence.Persister;
import net.citizensnpcs.api.util.DataKey;
public class WaypointTriggerRegistry implements Persister<WaypointTrigger> { public class WaypointTriggerRegistry implements Persister<WaypointTrigger> {
@Override @Override
public WaypointTrigger create(DataKey root) { public WaypointTrigger create(DataKey root) {
@ -54,6 +54,5 @@ public class WaypointTriggerRegistry implements Persister<WaypointTrigger> {
addTrigger("delay", DelayTrigger.class, DelayTriggerPrompt.class); addTrigger("delay", DelayTrigger.class, DelayTriggerPrompt.class);
addTrigger("teleport", TeleportTrigger.class, TeleportTriggerPrompt.class); addTrigger("teleport", TeleportTrigger.class, TeleportTriggerPrompt.class);
addTrigger("speed", SpeedTrigger.class, SpeedTriggerPrompt.class); addTrigger("speed", SpeedTrigger.class, SpeedTriggerPrompt.class);
// addTrigger("pose", PoseTrigger.class, PoseTriggerPrompt.class);
} }
} }

View File

@ -147,10 +147,11 @@ public class WitherController extends MobEntityController {
protected void M() { protected void M() {
if (npc == null) { if (npc == null) {
super.M(); super.M();
} } else {
npc.update(); npc.update();
} }
} }
}
public static class WitherNPC extends CraftWither implements NPCHolder { public static class WitherNPC extends CraftWither implements NPCHolder {
private final CitizensNPC npc; private final CitizensNPC npc;