Index: binary-improvements/AllocsCommands/Commands/TeleportPlayer.cs
===================================================================
--- binary-improvements/AllocsCommands/Commands/TeleportPlayer.cs	(revision 228)
+++ binary-improvements/AllocsCommands/Commands/TeleportPlayer.cs	(revision 230)
@@ -1,3 +1,2 @@
-using AllocsFixes.PersistentData;
 using System;
 using System.Collections.Generic;
@@ -6,38 +5,31 @@
 namespace AllocsFixes.CustomCommands
 {
-	public class TeleportPlayer : ConsoleCommand
+	public class TeleportPlayer : ConsoleCmdAbstract
 	{
-		public TeleportPlayer (ConsoleSdtd cons) : base(cons)
-		{
-		}
-
-		public override string Description ()
+		public override string GetDescription ()
 		{
 			return "teleport a player to a given location";
 		}
 
-		public override string[] Names ()
+		public override string[] GetCommands ()
 		{
 			return new string[] { "teleportplayer", "tele" };
 		}
 
-		public override void Run (string[] _params)
+		public override void Execute (List<string> _params, CommandSenderInfo _senderInfo)
 		{
 			try {
-				if (_params.Length != 4 && _params.Length != 2) {
-					m_Console.SendResult ("Usage: teleportplayer <entityid|playername|steamid> <x> <y> <z>");
-					m_Console.SendResult ("   or: teleportplayer <entityid|playername|steamid> <target entityid|playername|steamid>");
+				if (_params.Count != 4 && _params.Count != 2) {
+					SdtdConsole.Instance.Output ("Usage: teleportplayer <entityid|playername|steamid> <x> <y> <z>");
+					SdtdConsole.Instance.Output ("   or: teleportplayer <entityid|playername|steamid> <target entityid|playername|steamid>");
 				} else {
-					Player p1 = PersistentContainer.Instance.Players.GetPlayerByNameOrId (_params [0], true);
-					if (p1 == null) {
-						m_Console.SendResult ("Playername or entity/steamid id not found.");
+					ClientInfo ci1 = ConsoleHelper.ParseParamIdOrName (_params [0]);
+					if (ci1 == null) {
+						SdtdConsole.Instance.Output ("Playername or entity/steamid id not found.");
 						return;
 					}
-					if (!p1.IsOnline) {
-						m_Console.SendResult ("Player not online.");
-						return;
-					}
+					EntityPlayer ep1 = GameManager.Instance.World.Players.dict [ci1.entityId];
 
-					if (_params.Length == 4) {
+					if (_params.Count == 4) {
 						int x = int.MinValue;
 						int y = int.MinValue;
@@ -49,30 +41,27 @@
 
 						if (x == int.MinValue || y == int.MinValue || z == int.MinValue) {
-							m_Console.SendResult ("At least one of the given coordinates is not a valid integer");
+							SdtdConsole.Instance.Output ("At least one of the given coordinates is not a valid integer");
 							return;
 						}
 
-						p1.Entity.position.x = x;
-						p1.Entity.position.y = y;
-						p1.Entity.position.z = z;
+						ep1.position.x = x;
+						ep1.position.y = y;
+						ep1.position.z = z;
 					} else {
-						Player p2 = PersistentContainer.Instance.Players.GetPlayerByNameOrId (_params [1], true);
-						if (p2 == null) {
-							m_Console.SendResult ("Target playername or entity/steamid id not found.");
+						ClientInfo ci2 = ConsoleHelper.ParseParamIdOrName (_params [1]);
+						if (ci2 == null) {
+							SdtdConsole.Instance.Output ("Target playername or entity/steamid id not found.");
 							return;
 						}
-						if (!p2.IsOnline) {
-							m_Console.SendResult ("Target player not online.");
-							return;
-						}
+						EntityPlayer ep2 = GameManager.Instance.World.Players.dict [ci2.entityId];
 
-						p1.Entity.position = p2.Entity.GetPosition();
-						p1.Entity.position.y += 1;
-						p1.Entity.position.z += 1;
+						ep1.position = ep2.GetPosition();
+						ep1.position.y += 1;
+						ep1.position.z += 1;
 					}
 
-					NetPackage_EntityTeleport pkg = new NetPackage_EntityTeleport (p1.Entity);
+					NetPackage_EntityTeleport pkg = new NetPackage_EntityTeleport (ep1);
 
-					ConnectionManager.Instance.SendPackage (pkg, new PackageDestinationSingleEntityID (p1.ClientInfo.entityId));
+					ci1.netConnection [0].AddToSendQueue (pkg);
 				}
 			} catch (Exception e) {
