Index: binary-improvements/7dtd-server-fixes/7dtd-server-fixes.csproj
===================================================================
--- binary-improvements/7dtd-server-fixes/7dtd-server-fixes.csproj	(revision 91)
+++ binary-improvements/7dtd-server-fixes/7dtd-server-fixes.csproj	(revision 93)
@@ -48,4 +48,6 @@
     <Compile Include="src\TelnetCommands\SetTimeReal.cs" />
     <Compile Include="src\AdminToolsStuff.cs" />
+    <Compile Include="src\TelnetCommands\ShowInventory.cs" />
+    <Compile Include="src\PlayerDataStuff.cs" />
   </ItemGroup>
   <Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
Index: binary-improvements/7dtd-server-fixes/7dtd-server-fixes.userprefs
===================================================================
--- binary-improvements/7dtd-server-fixes/7dtd-server-fixes.userprefs	(revision 91)
+++ binary-improvements/7dtd-server-fixes/7dtd-server-fixes.userprefs	(revision 93)
@@ -4,9 +4,9 @@
     <Files>
       <File FileName="src/AssemblyInfo.cs" Line="20" Column="40" />
-      <File FileName="src/AllocsNetTelnetServer.cs" Line="33" Column="1" />
+      <File FileName="src/AllocsNetTelnetServer.cs" Line="93" Column="50" />
       <File FileName="src/AllocsTelnetConnection.cs" Line="44" Column="42" />
       <File FileName="src/AllocsLogFunctions.cs" Line="27" Column="42" />
-      <File FileName="src/TelnetCommands/GetGamePrefs.cs" Line="71" Column="3" />
-      <File FileName="src/TelnetCommands/ListPlayersExtended.cs" Line="49" Column="17" />
+      <File FileName="src/TelnetCommands/GetGamePrefs.cs" Line="77" Column="1" />
+      <File FileName="src/TelnetCommands/ListPlayersExtended.cs" Line="64" Column="31" />
       <File FileName="src/TelnetCommands/SayToPlayer.cs" Line="75" Column="33" />
       <File FileName="src/AdminToolsStuff.cs" Line="30" Column="54" />
Index: binary-improvements/7dtd-server-fixes/src/AllocsNetTelnetServer.cs
===================================================================
--- binary-improvements/7dtd-server-fixes/src/AllocsNetTelnetServer.cs	(revision 91)
+++ binary-improvements/7dtd-server-fixes/src/AllocsNetTelnetServer.cs	(revision 93)
@@ -14,5 +14,5 @@
 	private static bool closed = false;
 	private static bool authEnabled = false;
-	private static List<AllocsTelnetConnection> conns = new List<AllocsTelnetConnection> ();
+	private static List<AllocsTelnetConnection> connections = new List<AllocsTelnetConnection> ();
 
 	public static void init (int port)
@@ -38,5 +38,5 @@
 				if (listener.Pending ()) {
 					AllocsTelnetConnection c = new AllocsTelnetConnection (listener.AcceptTcpClient (), authEnabled);
-					conns.Add (c);
+					connections.Add (c);
 					Log.Out ("Telnet connection from: " + c.GetEndPoint ());
 					if (authEnabled) {
@@ -47,8 +47,8 @@
 				}
 
-				foreach (AllocsTelnetConnection c in conns) {
+				foreach (AllocsTelnetConnection c in connections) {
 					if (c.IsClosed ()) {
 						c.Close ();
-						conns.Remove (c);
+						connections.Remove (c);
 						break;
 					}
@@ -70,5 +70,5 @@
 								Log.Out ("Telnet connection closed by client: " + c.GetEndPoint ());
 								c.Close ();
-								conns.Remove (c);
+								connections.Remove (c);
 								break;
 							}
@@ -124,5 +124,5 @@
 			listener.Stop ();
 		}
-		foreach (AllocsTelnetConnection c in conns) {
+		foreach (AllocsTelnetConnection c in connections) {
 			c.Close ();
 		}
@@ -139,9 +139,10 @@
 		console.AddCommand(new SayToPlayer(console));
 		console.AddCommand(new SetTimeReal(console));
+		console.AddCommand(new ShowInventory(console));
 	}
 
 	private static void RemoveClosedConnections ()
 	{
-		foreach (AllocsTelnetConnection c in conns) {
+		foreach (AllocsTelnetConnection c in connections) {
 			if (c.IsClosed ()) {
 				c.Close ();
@@ -156,5 +157,5 @@
 		}
 		RemoveClosedConnections ();
-		foreach (AllocsTelnetConnection c in conns) {
+		foreach (AllocsTelnetConnection c in connections) {
 			if (c.IsAuthenticated ())
 				c.WriteLine (line);
Index: binary-improvements/7dtd-server-fixes/src/PlayerDataStuff.cs
===================================================================
--- binary-improvements/7dtd-server-fixes/src/PlayerDataStuff.cs	(revision 93)
+++ binary-improvements/7dtd-server-fixes/src/PlayerDataStuff.cs	(revision 93)
@@ -0,0 +1,85 @@
+using System;
+using System.Collections.Generic;
+
+public class PlayerDataStuff
+{
+	public class PlayerItems
+	{
+		public SortedList<string, int> belt = new SortedList<string, int> ();
+		public SortedList<string, int> bag = new SortedList<string, int> ();
+
+		public PlayerItems (InventoryField[] belt, InventoryField[] bag)
+		{
+			foreach (InventoryField item in belt) {
+				if (item.count > 0) {
+					this.belt.Add (getInvFieldName (item), item.count);
+				}
+			}
+
+			foreach (InventoryField item in bag) {
+				if (item.count > 0) {
+					this.bag.Add (getInvFieldName (item), item.count);
+				}
+			}
+		}
+	};
+
+	private static Dictionary<int, PlayerItems> itemsPerEntityId = new Dictionary<int, PlayerItems> ();
+
+	public static PlayerItems GetPlayerItems (int entityId)
+	{
+		if (itemsPerEntityId.ContainsKey (entityId))
+			return itemsPerEntityId [entityId];
+		else
+			return null;
+	}
+
+	public static void GM_SavePlayerData (GameManager manager, int _clientId, PlayerDataFile _playerDataFile)
+	{
+		if (manager.connectionManager.mapClientToEntity.ContainsKey (_clientId)) {
+			int entityId = manager.connectionManager.mapClientToEntity [_clientId];
+			Log.Out ("Saving playerData for entity id: " + entityId);
+
+			if (itemsPerEntityId.ContainsKey(entityId))
+				itemsPerEntityId.Remove(entityId);
+			itemsPerEntityId.Add (entityId, new PlayerItems (_playerDataFile.inventory, _playerDataFile.bag));
+		}
+		/*
+		Log.Out ("Inventory of player:");
+		for (int i = 0; i < _playerDataFile.inventory.Length; i++) {
+			InventoryField item = _playerDataFile.inventory [i];
+			printItem (item, i);
+		}
+
+		Log.Out ("Bag of player:");
+		for (int i = 0; i < _playerDataFile.bag.Length; i++) {
+			InventoryField item = _playerDataFile.bag [i];
+			printItem (item, i);
+		}*/
+	}
+
+	private static string getInvFieldName (InventoryField item)
+	{
+		ItemBase iBase = ItemBase.list [item.itemValue.type];
+		string name = iBase.name;
+		if (iBase.IsBlock ()) {
+			ItemBlock iBlock = (ItemBlock)iBase;
+			name = iBlock.GetItemName (item.itemValue);
+		}
+		return name;
+	}
+
+	private static void printItem (InventoryField item, int slot)
+	{
+		if (item.count > 0) {
+			ItemBase iBase = ItemBase.list [item.itemValue.type];
+			string name = iBase.name;
+			if (iBase.IsBlock ()) {
+				ItemBlock iBlock = (ItemBlock)iBase;
+				name = iBlock.GetItemName (item.itemValue);
+			}
+			Log.Out (string.Format ("Slot {0:00}: {1:00} * {2}", slot, item.count, name));
+		}
+	}
+}
+
Index: binary-improvements/7dtd-server-fixes/src/TelnetCommands/ShowInventory.cs
===================================================================
--- binary-improvements/7dtd-server-fixes/src/TelnetCommands/ShowInventory.cs	(revision 93)
+++ binary-improvements/7dtd-server-fixes/src/TelnetCommands/ShowInventory.cs	(revision 93)
@@ -0,0 +1,64 @@
+using System;
+using System.Collections.Generic;
+
+public class ShowInventory : ConsoleCommand
+{
+	private GameManager manager;
+
+	public ShowInventory (ConsoleSdtd cons) : base(cons)
+	{
+		manager = m_Console.gameManager;
+	}
+
+	public override string Description ()
+	{
+		return "list inventory of a given player (entity id or name)";
+	}
+
+	public override string[] Names ()
+	{
+		return new string[] { "showinventory", "si" };
+	}
+
+	public override void Run (string[] _params)
+	{
+		if (_params.Length < 1) {
+			m_Console.md000a ("Usage: showinventory <playername|entityid>");
+			return;
+		}
+
+		int entityId = -1;
+		PlayerDataStuff.PlayerItems items = null;
+		if (int.TryParse (_params [0], out entityId)) {
+			items = PlayerDataStuff.GetPlayerItems (entityId);
+		}
+
+		if (items == null) {
+			string playerName = _params [0].ToLower ();
+			foreach (KeyValuePair<int, EntityPlayer> kvp in manager.World.playerEntities.dict) {
+				if (kvp.Value.EntityName.ToLower ().Equals (playerName)) {
+					entityId = kvp.Key;
+					break;
+				}
+			}
+		}
+		items = PlayerDataStuff.GetPlayerItems (entityId);
+
+		if (items == null) {
+			m_Console.md000a ("Playername or entity id not found or no inventory saved (first saved after a player has been online for 30s).");
+			return;
+		}
+
+		m_Console.md000a ("Belt of player:");
+		foreach (KeyValuePair<string, int> kvp in items.belt) {
+			m_Console.md000a (string.Format ("    {0:000} * {1}", kvp.Value, kvp.Key));
+		}
+		m_Console.md000a (string.Empty);
+		m_Console.md000a ("Bagpack of player:");
+		foreach (KeyValuePair<string, int> kvp in items.bag) {
+			m_Console.md000a (string.Format ("    {0:000} * {1}", kvp.Value, kvp.Key));
+		}
+		m_Console.md000a (string.Empty);
+	}
+}
+
