1
0

AdminCommandAttribute.cs 799 B

12345678910111213141516171819202122232425
  1. using Content.Shared.Administration;
  2. using JetBrains.Annotations;
  3. using Robust.Shared.Console;
  4. namespace Content.Server.Administration
  5. {
  6. /// <summary>
  7. /// Specifies that a command can only be executed by an admin with the specified flags.
  8. /// </summary>
  9. /// <remarks>
  10. /// If this attribute is used multiple times, either attribute's flag sets can be used to get access.
  11. /// </remarks>
  12. /// <seealso cref="AnyCommandAttribute"/>
  13. [AttributeUsage(AttributeTargets.Class | AttributeTargets.Method, AllowMultiple = true)]
  14. [MeansImplicitUse]
  15. public sealed class AdminCommandAttribute : Attribute
  16. {
  17. public AdminCommandAttribute(AdminFlags flags)
  18. {
  19. Flags = flags;
  20. }
  21. public AdminFlags Flags { get; }
  22. }
  23. }