mirror of
https://github.com/EssentialsX/Essentials.git
synced 2025-01-29 11:31:55 +01:00
Slightly reorder teleport messages to be less confusing.
This commit is contained in:
parent
9b69403ee1
commit
8e7589e450
@ -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))
|
||||
{
|
||||
|
@ -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
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user