Allow yaw & pitch in /tppos

This commit is contained in:
snowleo 2011-09-18 03:34:05 +02:00
parent 4811e46dd6
commit b2394048fa
2 changed files with 7 additions and 1 deletions

View file

@ -26,6 +26,12 @@ public class Commandtppos extends EssentialsCommand
int y = Integer.parseInt(args[1]);
int z = Integer.parseInt(args[2]);
Location l = new Location(user.getWorld(), x, y, z);
if (args.length > 3) {
l.setYaw(Float.parseFloat(args[3]));
}
if (args.length > 4) {
l.setPitch(Float.parseFloat(args[4]));
}
Trade charge = new Trade(this.getName(), ess);
charge.isAffordableFor(user);
user.sendMessage(Util.i18n("teleporting"));

View file

@ -330,7 +330,7 @@ commands:
usage: /<command> <player>
tppos:
description: Teleport to coordinates.
usage: /<command> <x> <y> <z>
usage: /<command> <x> <y> <z> [yaw] [pitch]
tptoggle:
description: Blocks all forms of teleportation.
usage: /<command>