1
0
mirror of https://github.com/essentials/Essentials.git synced 2025-08-12 17:45:08 +02:00

Allow yaw & pitch in /tppos

This commit is contained in:
snowleo
2011-09-18 03:34:05 +02:00
parent 455c003440
commit b6a2d7397d
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>