mirror of
https://github.com/CitizensDev/Citizens2.git
synced 2024-11-26 20:55:44 +01:00
save location after teleport
This commit is contained in:
parent
bdc81f1b95
commit
67c8d61715
Binary file not shown.
@ -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.");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user