From b6a2d7397d2246951d47d818184692f3e3cdd73f Mon Sep 17 00:00:00 2001 From: snowleo Date: Sun, 18 Sep 2011 03:34:05 +0200 Subject: Allow yaw & pitch in /tppos --- Essentials/src/com/earth2me/essentials/commands/Commandtppos.java | 6 ++++++ Essentials/src/plugin.yml | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/Essentials/src/com/earth2me/essentials/commands/Commandtppos.java b/Essentials/src/com/earth2me/essentials/commands/Commandtppos.java index 0786f9cb9..ce7c369e4 100644 --- a/Essentials/src/com/earth2me/essentials/commands/Commandtppos.java +++ b/Essentials/src/com/earth2me/essentials/commands/Commandtppos.java @@ -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")); diff --git a/Essentials/src/plugin.yml b/Essentials/src/plugin.yml index 2090e8484..24049354c 100644 --- a/Essentials/src/plugin.yml +++ b/Essentials/src/plugin.yml @@ -330,7 +330,7 @@ commands: usage: / tppos: description: Teleport to coordinates. - usage: / + usage: / [yaw] [pitch] tptoggle: description: Blocks all forms of teleportation. usage: / -- cgit v1.2.3