Added better warning message when teleport is unavaiable

This commit is contained in:
ricky 2011-06-21 14:26:54 +10:00
parent 9106a56524
commit c3f274f307

View file

@ -675,7 +675,7 @@ namespace TShockAPI
if (args.Player.Teleport(Main.spawnTileX, Main.spawnTileY)) if (args.Player.Teleport(Main.spawnTileX, Main.spawnTileY))
args.Player.SendMessage("Teleported to the map's spawnpoint."); args.Player.SendMessage("Teleported to the map's spawnpoint.");
else else
args.Player.SendMessage("Can't teleport because you have set custom spawnpoint.", Color.Red); args.Player.SendMessage("Teleport unavailable custom spawnpoint set (to unset die after bed is destroyed).", Color.Red);
} }
private static void TP(CommandArgs args) private static void TP(CommandArgs args)
@ -704,7 +704,7 @@ namespace TShockAPI
if (args.Player.Teleport(plr.TileX, plr.TileY)) if (args.Player.Teleport(plr.TileX, plr.TileY))
args.Player.SendMessage(string.Format("Teleported to {0}", plr.Name)); args.Player.SendMessage(string.Format("Teleported to {0}", plr.Name));
else else
args.Player.SendMessage("Can't teleport because you have set custom spawnpoint.", Color.Red); args.Player.SendMessage("Teleport unavailable custom spawnpoint set (to unset die after bed is destroyed).", Color.Red);
} }
} }
@ -741,7 +741,7 @@ namespace TShockAPI
args.Player.SendMessage(string.Format("You brought {0} here.", plr.Name)); args.Player.SendMessage(string.Format("You brought {0} here.", plr.Name));
} }
else else
args.Player.SendMessage("Can't teleport because target player has set custom spawnpoint.", Color.Red); args.Player.SendMessage("Teleport unavailable target player has custom spawnpoint set.", Color.Red);
} }
} }