mirror of
https://github.com/Multiverse/Multiverse-Core.git
synced 2024-09-29 07:37:27 +02: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();
|
Player p = (Player) e.getPassenger();
|
||||||
p.sendMessage("No safe locations found!");
|
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;
|
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!");
|
teleporter.sendMessage("Sorry Boss, I tried everything, but just couldn't teleport ya there!");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if(!this.playerTeleporter.safelyTeleport(teleportee, l)) {
|
if (!this.playerTeleporter.safelyTeleport(teleportee, l)) {
|
||||||
Class<?> paramTypes[] = { Player.class, Location.class };
|
Class<?> paramTypes[] = { Player.class, Location.class };
|
||||||
List<Object> items = new ArrayList<Object>();
|
List<Object> items = new ArrayList<Object>();
|
||||||
items.add(teleportee);
|
items.add(teleportee);
|
||||||
items.add(l);
|
items.add(l);
|
||||||
String message = "Multiverse" + ChatColor.WHITE + " did not teleport you to " + ChatColor.DARK_AQUA + d.getName() + ChatColor.WHITE + " because it was unsafe.";
|
String player = "you";
|
||||||
this.plugin.getCommandHandler().queueCommand(sender, "mvteleport", "teleportPlayer", items, paramTypes, "", "", ChatColor.GREEN + message, "Would you like to try anyway?", 15);
|
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