From 226470d743a5a505dea351ad019ff3c449e6cb63 Mon Sep 17 00:00:00 2001 From: fullwall Date: Tue, 17 Jan 2017 16:08:33 +0800 Subject: [PATCH] Fix wither crash --- .../trait/waypoint/triggers/WaypointTriggerRegistry.java | 9 ++++----- .../nms/v1_11_R1/entity/WitherController.java | 3 ++- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/main/src/main/java/net/citizensnpcs/trait/waypoint/triggers/WaypointTriggerRegistry.java b/main/src/main/java/net/citizensnpcs/trait/waypoint/triggers/WaypointTriggerRegistry.java index e9c164046..35b1f8988 100644 --- a/main/src/main/java/net/citizensnpcs/trait/waypoint/triggers/WaypointTriggerRegistry.java +++ b/main/src/main/java/net/citizensnpcs/trait/waypoint/triggers/WaypointTriggerRegistry.java @@ -2,15 +2,15 @@ package net.citizensnpcs.trait.waypoint.triggers; 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 com.google.common.base.Joiner; 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 { @Override public WaypointTrigger create(DataKey root) { @@ -54,6 +54,5 @@ public class WaypointTriggerRegistry implements Persister { addTrigger("delay", DelayTrigger.class, DelayTriggerPrompt.class); addTrigger("teleport", TeleportTrigger.class, TeleportTriggerPrompt.class); addTrigger("speed", SpeedTrigger.class, SpeedTriggerPrompt.class); - // addTrigger("pose", PoseTrigger.class, PoseTriggerPrompt.class); } } diff --git a/v1_11_R1/src/main/java/net/citizensnpcs/nms/v1_11_R1/entity/WitherController.java b/v1_11_R1/src/main/java/net/citizensnpcs/nms/v1_11_R1/entity/WitherController.java index 2e8d59738..5d41eefb4 100644 --- a/v1_11_R1/src/main/java/net/citizensnpcs/nms/v1_11_R1/entity/WitherController.java +++ b/v1_11_R1/src/main/java/net/citizensnpcs/nms/v1_11_R1/entity/WitherController.java @@ -147,8 +147,9 @@ public class WitherController extends MobEntityController { protected void M() { if (npc == null) { super.M(); + } else { + npc.update(); } - npc.update(); } }