Added fancy formatting to force teleport.

This commit is contained in:
Eric Stokes 2011-07-30 09:27:18 -06:00
parent addd95443a
commit 0c3a3732be
2 changed files with 8 additions and 4 deletions

View File

@ -197,7 +197,7 @@ public class MVTeleport {
Player p = (Player) e.getPassenger();
p.sendMessage("No safe locations found!");
}
this.plugin.log(Level.WARNING, "Sorry champ, you're(" + e.getEntityId() + ") basically trying to teleport into a minefield. I should just kill you now.");
this.plugin.log(Level.WARNING, "Sorry champ, you're basically trying to teleport into a minefield. I should just kill you now.");
return false;
}

View File

@ -107,13 +107,17 @@ public class TeleportCommand extends MultiverseCommand {
teleporter.sendMessage("Sorry Boss, I tried everything, but just couldn't teleport ya there!");
return;
}
if(!this.playerTeleporter.safelyTeleport(teleportee, l)) {
if (!this.playerTeleporter.safelyTeleport(teleportee, l)) {
Class<?> paramTypes[] = { Player.class, Location.class };
List<Object> items = new ArrayList<Object>();
items.add(teleportee);
items.add(l);
String message = "Multiverse" + ChatColor.WHITE + " did not teleport you to " + ChatColor.DARK_AQUA + d.getName() + ChatColor.WHITE + " because it was unsafe.";
this.plugin.getCommandHandler().queueCommand(sender, "mvteleport", "teleportPlayer", items, paramTypes, "", "", ChatColor.GREEN + message, "Would you like to try anyway?", 15);
String player = "you";
if (!teleportee.equals(teleporter)) {
player = teleportee.getName();
}
String message = ChatColor.GREEN + "Multiverse" + ChatColor.WHITE + " did not teleport " + ChatColor.AQUA + player + ChatColor.WHITE + " to " + ChatColor.DARK_AQUA + d.getName() + ChatColor.WHITE + " because it was unsafe.";
this.plugin.getCommandHandler().queueCommand(sender, "mvteleport", "teleportPlayer", items, paramTypes, message, "Would you like to try anyway?", "", "", 15);
}
}
}