From e7daa38eef9ec72ffcd674d5036db172aa3e0905 Mon Sep 17 00:00:00 2001 From: Jeremy Schroeder Date: Thu, 27 Sep 2012 18:03:04 -0400 Subject: [PATCH] Add '/npc position -a' to have the NPC's head assume the position of the Player's head. --- src/main/java/net/citizensnpcs/command/command/NPCCommands.java | 1 + 1 file changed, 1 insertion(+) diff --git a/src/main/java/net/citizensnpcs/command/command/NPCCommands.java b/src/main/java/net/citizensnpcs/command/command/NPCCommands.java index 2c6741cb8..b2ff03f15 100644 --- a/src/main/java/net/citizensnpcs/command/command/NPCCommands.java +++ b/src/main/java/net/citizensnpcs/command/command/NPCCommands.java @@ -668,6 +668,7 @@ public class NPCCommands { // Assume Player's position if (args.hasFlag('a')) { if (sender instanceof Player) { + // Spawn the NPC if it isn't spawned to prevent NPEs if (!npc.isSpawned()) npc.spawn(npc.getTrait(CurrentLocation.class).getLocation());