mirror of
https://github.com/TotalFreedomMC/TF-EssentialsX.git
synced 2025-06-06 06:19:45 +00:00
Allow yaw & pitch in /tppos
This commit is contained in:
parent
4811e46dd6
commit
b2394048fa
2 changed files with 7 additions and 1 deletions
|
@ -26,6 +26,12 @@ public class Commandtppos extends EssentialsCommand
|
||||||
int y = Integer.parseInt(args[1]);
|
int y = Integer.parseInt(args[1]);
|
||||||
int z = Integer.parseInt(args[2]);
|
int z = Integer.parseInt(args[2]);
|
||||||
Location l = new Location(user.getWorld(), x, y, z);
|
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);
|
Trade charge = new Trade(this.getName(), ess);
|
||||||
charge.isAffordableFor(user);
|
charge.isAffordableFor(user);
|
||||||
user.sendMessage(Util.i18n("teleporting"));
|
user.sendMessage(Util.i18n("teleporting"));
|
||||||
|
|
|
@ -330,7 +330,7 @@ commands:
|
||||||
usage: /<command> <player>
|
usage: /<command> <player>
|
||||||
tppos:
|
tppos:
|
||||||
description: Teleport to coordinates.
|
description: Teleport to coordinates.
|
||||||
usage: /<command> <x> <y> <z>
|
usage: /<command> <x> <y> <z> [yaw] [pitch]
|
||||||
tptoggle:
|
tptoggle:
|
||||||
description: Blocks all forms of teleportation.
|
description: Blocks all forms of teleportation.
|
||||||
usage: /<command>
|
usage: /<command>
|
||||||
|
|
Loading…
Reference in a new issue