mirror of
https://github.com/CitizensDev/Citizens2.git
synced 2024-11-24 11:38:26 +01:00
Update master
This commit is contained in:
parent
e28e06ea2a
commit
dfdce9e4b6
@ -323,17 +323,17 @@ public class NPCCommands {
|
||||
npc.spawn(npc.getTrait(CurrentLocation.class).getLocation());
|
||||
Location current = npc.getBukkitEntity().getLocation();
|
||||
Location to = current.clone();
|
||||
if (args.hasFlag("x"))
|
||||
if (args.hasValueFlag("x"))
|
||||
to.setX(args.getFlagInteger("x"));
|
||||
if (args.hasFlag("y"))
|
||||
if (args.hasValueFlag("y"))
|
||||
to.setY(args.getFlagInteger("y"));
|
||||
if (args.hasFlag("z"))
|
||||
if (args.hasValueFlag("z"))
|
||||
to.setZ(args.getFlagInteger("z"));
|
||||
if (args.hasFlag("yaw"))
|
||||
if (args.hasValueFlag("yaw"))
|
||||
to.setYaw((float) args.getFlagDouble("yaw"));
|
||||
if (args.hasFlag("pitch"))
|
||||
if (args.hasValueFlag("pitch"))
|
||||
to.setPitch((float) args.getFlagDouble("pitch"));
|
||||
if (args.hasFlag("world")){
|
||||
if (args.hasValueFlag("world")){
|
||||
World world = Bukkit.getWorld(args.getFlag("world"));
|
||||
if (world == null)
|
||||
throw new CommandException("Given world not found.");
|
||||
|
Loading…
Reference in New Issue
Block a user