mirror of
https://github.com/Multiverse/Multiverse-Core.git
synced 2024-11-26 04:25:37 +01:00
Added fancy formatting to force teleport.
This commit is contained in:
parent
addd95443a
commit
0c3a3732be
@ -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;
|
||||
}
|
||||
|
||||
|
@ -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);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user