Add '/npc position -a' to have the NPC's head assume the position of the Player's head.

This commit is contained in:
Jeremy Schroeder 2012-09-27 18:03:04 -04:00
parent 2d78bdaad0
commit e7daa38eef

View File

@ -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());