From e0893adb127f78c8de7ee6cfde114ea63e55c68e Mon Sep 17 00:00:00 2001 From: KHobbits Date: Sat, 28 Jun 2014 18:06:13 +0100 Subject: Slightly reorder teleport messages to be less confusing. --- Essentials/src/com/earth2me/essentials/Teleport.java | 4 ++-- Essentials/src/com/earth2me/essentials/commands/Commandtp.java | 8 ++++---- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/Essentials/src/com/earth2me/essentials/Teleport.java b/Essentials/src/com/earth2me/essentials/Teleport.java index 2267d18ed..6203f3a3b 100644 --- a/Essentials/src/com/earth2me/essentials/Teleport.java +++ b/Essentials/src/com/earth2me/essentials/Teleport.java @@ -147,8 +147,8 @@ public class Teleport implements net.ess3.api.ITeleport public void teleport(Player entity, Trade chargeFor, TeleportCause cause) throws Exception { ITarget target = new PlayerTarget(entity); - teleport(teleportOwner, target, chargeFor, cause); teleportOwner.sendMessage(tl("teleportToPlayer", entity.getDisplayName())); + teleport(teleportOwner, target, chargeFor, cause); } //This is used when teleporting to stored location @@ -177,7 +177,7 @@ public class Teleport implements net.ess3.api.ITeleport if (chargeFor != null) { chargeFor.isAffordableFor(teleportOwner); - + //This code is to make sure that commandcosts are checked in the initial world, and not in the resulting world. if (!chargeFor.getCommandCost(teleportOwner).equals(BigDecimal.ZERO)) { diff --git a/Essentials/src/com/earth2me/essentials/commands/Commandtp.java b/Essentials/src/com/earth2me/essentials/commands/Commandtp.java index 4fc135c84..c352f217f 100644 --- a/Essentials/src/com/earth2me/essentials/commands/Commandtp.java +++ b/Essentials/src/com/earth2me/essentials/commands/Commandtp.java @@ -58,8 +58,8 @@ public class Commandtp extends EssentialsCommand { throw new Exception(tl("teleportDisabled", target2.getDisplayName())); } - target2.getTeleport().now(loc, false, TeleportCause.COMMAND); user.sendMessage(tl("teleporting", loc.getWorld().getName(), loc.getBlockX(), loc.getBlockY(), loc.getBlockZ())); + target2.getTeleport().now(loc, false, TeleportCause.COMMAND); target2.sendMessage(tl("teleporting", loc.getWorld().getName(), loc.getBlockX(), loc.getBlockY(), loc.getBlockZ())); break; case 2: @@ -83,8 +83,8 @@ public class Commandtp extends EssentialsCommand { throw new Exception(tl("noPerm", "essentials.worlds." + toPlayer.getWorld().getName())); } - target.getTeleport().now(toPlayer.getBase(), false, TeleportCause.COMMAND); target.sendMessage(tl("teleportAtoB", user.getDisplayName(), toPlayer.getDisplayName())); + target.getTeleport().now(toPlayer.getBase(), false, TeleportCause.COMMAND); break; } } @@ -101,8 +101,8 @@ public class Commandtp extends EssentialsCommand if (args.length == 2) { final User toPlayer = getPlayer(server, args, 1, true, false); - target.getTeleport().now(toPlayer.getBase(), false, TeleportCause.COMMAND); target.sendMessage(tl("teleportAtoB", Console.NAME, toPlayer.getDisplayName())); + target.getTeleport().now(toPlayer.getBase(), false, TeleportCause.COMMAND); } else if (args.length > 3) { @@ -114,9 +114,9 @@ public class Commandtp extends EssentialsCommand throw new NotEnoughArgumentsException(tl("teleportInvalidLocation")); } final Location loc = new Location(target.getWorld(), x, y, z, target.getLocation().getYaw(), target.getLocation().getPitch()); + sender.sendMessage(tl("teleporting", loc.getWorld().getName(), loc.getBlockX(), loc.getBlockY(), loc.getBlockZ())); target.getTeleport().now(loc, false, TeleportCause.COMMAND); target.sendMessage(tl("teleporting", loc.getWorld().getName(), loc.getBlockX(), loc.getBlockY(), loc.getBlockZ())); - sender.sendMessage(tl("teleporting", loc.getWorld().getName(), loc.getBlockX(), loc.getBlockY(), loc.getBlockZ())); } else { -- cgit v1.2.3