save location after teleport

This commit is contained in:
aPunch 2012-02-20 15:42:59 -06:00
parent bdc81f1b95
commit 67c8d61715
2 changed files with 1 additions and 0 deletions

Binary file not shown.

View File

@ -234,6 +234,7 @@ public class NPCCommands {
if (!npc.isSpawned()) if (!npc.isSpawned())
npc.spawn(npc.getTrait(SpawnLocation.class).getLocation()); npc.spawn(npc.getTrait(SpawnLocation.class).getLocation());
npc.getBukkitEntity().teleport(player, TeleportCause.COMMAND); npc.getBukkitEntity().teleport(player, TeleportCause.COMMAND);
npc.getTrait(SpawnLocation.class).setLocation(npc.getBukkitEntity().getLocation());
Messaging.send(player, StringHelper.wrap(npc.getName()) + " was teleported to your location."); Messaging.send(player, StringHelper.wrap(npc.getName()) + " was teleported to your location.");
} }