mirror of
https://github.com/essentials/Essentials.git
synced 2025-08-13 10:04:51 +02:00
Allow yaw & pitch in /tppos
This commit is contained in:
@@ -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>
|
||||||
|
Reference in New Issue
Block a user