mirror of
https://github.com/CitizensDev/Citizens2.git
synced 2024-11-30 22:53:24 +01:00
Update master
This commit is contained in:
parent
8198e82aaf
commit
de5edc19ad
@ -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