Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Update CleanupModule.cs
  • Loading branch information
SplenectomY authored Aug 23, 2018
commit 4c924ba5e1a2ec7c01fd9e63ab4e3e56aa9437fb
10 changes: 7 additions & 3 deletions Essentials/Commands/CleanupModule.cs
Original file line number Diff line number Diff line change
Expand Up @@ -281,11 +281,15 @@ public bool OwnedBy(MyCubeGrid grid, string str)
var player = Utilities.GetPlayerByNameOrId(str);
if (player == null)
{
if(MySession.Static.Players.IdentityIsNpc(identityId))
if(long.TryParse(str, out long NPCId))
{
return grid.BigOwners.Contains(identityId);
if(MySession.Static.Players.IdentityIsNpc(NPCId))
return grid.BigOwners.Contains(NPCId);
}
else
{
return false;
}
else return false;

identityId = player.IdentityId;
}
Expand Down