mirror of
https://github.com/Multiverse/Multiverse-Core.git
synced 2024-11-29 05:55:48 +01:00
Fix telling people they can't go to a world, then taking them there anyways. #whoops
This commit is contained in:
parent
8ecfebe480
commit
f86f753563
@ -73,12 +73,14 @@ public class TeleportCommand extends BaseCommand {
|
||||
} else {
|
||||
teleporter.sendMessage("Doesn't look like you're allowed to send " + ChatColor.GOLD + teleportee.getName() + ChatColor.WHITE + " to " + ChatColor.RED + "there...");
|
||||
}
|
||||
return;
|
||||
} else if (teleporter != null && !this.plugin.ph.canTravelFromWorld(teleporter, this.plugin.getServer().getWorld(d.getName()))) {
|
||||
if (teleportee.equals(teleporter)) {
|
||||
teleporter.sendMessage("DOH! Doesn't look like you can get to " + ChatColor.RED + d.getName() + " from " + ChatColor.GREEN + teleporter.getWorld().getName());
|
||||
} else {
|
||||
teleporter.sendMessage("DOH! Doesn't look like " + ChatColor.GREEN + teleporter.getWorld().getName() + " can get to " + ChatColor.RED + d.getName() + " from where they are...");
|
||||
}
|
||||
return;
|
||||
}
|
||||
Location l = this.playerTeleporter.getSafeDestination(this.plugin.getServer().getWorld(d.getName()).getSpawnLocation());
|
||||
teleportee.teleport(l);
|
||||
|
Loading…
Reference in New Issue
Block a user