Update Estate.cs

This commit is contained in:
Madpeter 2025-07-10 22:05:49 +01:00
parent 33a069df25
commit e1cb79f1fa

View file

@ -18,10 +18,15 @@ namespace SecondBotEvents.Commands
[ReturnHintsFailure("Invaild inventoryNotecardUUID")] [ReturnHintsFailure("Invaild inventoryNotecardUUID")]
[ReturnHintsFailure("Unable to find notecard")] [ReturnHintsFailure("Unable to find notecard")]
[ReturnHintsFailure("Item is not a notecard")] [ReturnHintsFailure("Item is not a notecard")]
[ReturnHintsFailure("Not an estate manager here")]
[ArgHints("inventoryNotecardUUID", "the UUID of the notecard you wish to set as the estate covenant", "UUID")] [ArgHints("inventoryNotecardUUID", "the UUID of the notecard you wish to set as the estate covenant", "UUID")]
[CmdTypeSet()] [CmdTypeSet()]
public object SetEstateCovenant(string inventoryNotecardUUID) public object SetEstateCovenant(string inventoryNotecardUUID)
{ {
if (GetClient().Network.CurrentSim.IsEstateManager == false)
{
return Failure("Not an estate manager here", [inventoryNotecardUUID]);
}
if (UUID.TryParse(inventoryNotecardUUID, out UUID targetitem) == false) if (UUID.TryParse(inventoryNotecardUUID, out UUID targetitem) == false)
{ {
return Failure("Invaild inventoryNotecardUUID", [inventoryNotecardUUID]); return Failure("Invaild inventoryNotecardUUID", [inventoryNotecardUUID]);