mirror of
https://github.com/CitizensDev/Citizens2.git
synced 2024-08-20 04:43:24 +02:00
Add '/npc position -a' to have the NPC's head assume the position of the Player's head.
This commit is contained in:
parent
2d78bdaad0
commit
e7daa38eef
|
@ -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());
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user