diff --git a/MinecraftClient/Mapping/Entity.cs b/MinecraftClient/Mapping/Entity.cs
index f069d885..1b913dd6 100644
--- a/MinecraftClient/Mapping/Entity.cs
+++ b/MinecraftClient/Mapping/Entity.cs
@@ -15,6 +15,11 @@ namespace MinecraftClient.Mapping
///
public int ID;
+ ///
+ /// UUID of the entity if it is a player.
+ ///
+ public Guid UUID;
+
///
/// Entity type determined by Minecraft Console Client
///
@@ -81,6 +86,19 @@ namespace MinecraftClient.Mapping
this.Type = type;
this.Location = location;
}
+ ///
+ /// Create a new entity based on Entity ID, Entity Type, location and UUID
+ ///
+ /// Entity ID
+ /// Entity Type Enum
+ /// Entity location
+ public Entity(int ID, EntityType type, Location location, Guid uuid)
+ {
+ this.ID = ID;
+ this.Type = type;
+ this.Location = location;
+ this.UUID = uuid;
+ }
///
/// Return TRUE if the Entity is an hostile mob
diff --git a/MinecraftClient/McTcpClient.cs b/MinecraftClient/McTcpClient.cs
index 6de3afd8..a2257a03 100644
--- a/MinecraftClient/McTcpClient.cs
+++ b/MinecraftClient/McTcpClient.cs
@@ -1271,7 +1271,7 @@ namespace MinecraftClient
public void OnSpawnPlayer(int EntityID, Guid UUID, Location location, byte Yaw, byte Pitch)
{
if (entities.ContainsKey(EntityID)) return;
- Entity entity = new Entity(EntityID, EntityType.Player, location);
+ Entity entity = new Entity(EntityID, EntityType.Player, location, UUID);
entities.Add(EntityID, entity);
foreach (ChatBot bot in bots.ToArray())
{