adds a memory check

This commit is contained in:
Madpeter 2020-04-28 05:37:43 +01:00
parent 90c835973d
commit 3c572a2682

View file

@ -23,6 +23,8 @@ namespace BSB.Commands.CMD_Parcel
if (UUID.TryParse(args[0], out UUID groupuuid) == true)
{
int localid = bot.GetClient.Parcels.GetParcelLocalID(bot.GetClient.Network.CurrentSim, bot.GetClient.Self.SimPosition);
if (bot.GetClient.Network.CurrentSim.Parcels.ContainsKey(localid) == true)
{
Parcel p = bot.GetClient.Network.CurrentSim.Parcels[localid];
if (parcel_static.has_parcel_perm(p, bot) == true)
{
@ -35,6 +37,11 @@ namespace BSB.Commands.CMD_Parcel
}
}
else
{
return Failed("Unable to find parcel in memory, please wait and try again");
}
}
else
{
return Failed("Unable to process group uuid");
}