mirror of
https://github.com/CitizensDev/Citizens2.git
synced 2025-02-03 14:02:01 +01:00
Update master
This commit is contained in:
parent
97b61473c4
commit
5c72a2ed01
@ -319,7 +319,7 @@ public class NPCCommands {
|
||||
|
||||
@Command(aliases = { "npc" }, usage = "moveto", desc = "Teleports a NPC to a given location", modifiers = "moveto",
|
||||
min = 1, max = 1, permission = "npc.moveto")
|
||||
public void moveto(CommandContext args, CommandSender sender, NPC npc) {
|
||||
public void moveto(CommandContext args, CommandSender sender, NPC npc) throws CommandException {
|
||||
// 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