mirror of
https://github.com/CitizensDev/Citizens2.git
synced 2024-12-28 20:17:50 +01:00
The /npc tpto command defaults from entity to selected NPC
This commit is contained in:
parent
a9bbf875eb
commit
580dd6a19e
@ -1080,6 +1080,8 @@ public class NPCCommands {
|
||||
@Requirements
|
||||
public void tpto(CommandContext args, CommandSender sender, NPC npc) throws CommandException {
|
||||
Entity from = null, to = null;
|
||||
if (npc != null)
|
||||
from = npc.getBukkitEntity();
|
||||
if (args.hasValueFlag("npc1")) {
|
||||
NPC fromNPC = CitizensAPI.getNPCRegistry().getById(args.getFlagInteger("npc1"));
|
||||
if (fromNPC != null)
|
||||
|
Loading…
Reference in New Issue
Block a user