summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKHobbits <rob@khobbits.co.uk>2014-06-28 18:06:13 +0100
committerKHobbits <rob@khobbits.co.uk>2014-06-28 18:06:13 +0100
commite0893adb127f78c8de7ee6cfde114ea63e55c68e (patch)
tree16a8136ca45e79f99dbe78b92227a237c2a97eb5
parent36f3540da9a18616c239330f7c1c8c772d20db57 (diff)
downloadEssentials-e0893adb127f78c8de7ee6cfde114ea63e55c68e.tar
Essentials-e0893adb127f78c8de7ee6cfde114ea63e55c68e.tar.gz
Essentials-e0893adb127f78c8de7ee6cfde114ea63e55c68e.tar.lz
Essentials-e0893adb127f78c8de7ee6cfde114ea63e55c68e.tar.xz
Essentials-e0893adb127f78c8de7ee6cfde114ea63e55c68e.zip
Slightly reorder teleport messages to be less confusing.
-rw-r--r--Essentials/src/com/earth2me/essentials/Teleport.java4
-rw-r--r--Essentials/src/com/earth2me/essentials/commands/Commandtp.java8
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
{