WorldGatedAttribute class
Marks a framework method that touches live game state and MUST self-gate on IsWorldActive. The Stellar.Analyzers STELLAR0006 rule fails the build if a method carrying this attribute lacks an if (!…IsWorldActive) return; early-return guard.
Rationale: a framework game-state unit that forgets its guard corrupts the world-connect handshake (everyone disconnects), whereas a plugin that forgets its own gate harms only itself. The analyzer therefore targets the framework’s own units (it runs on src/ only, never plugin projects). This attribute is a no-op at runtime — purely a compile-time contract marker.
[AttributeUsage(AttributeTargets.Method, Inherited = false)]public sealed class WorldGatedAttribute : AttributePublic Members
Section titled “Public Members”| name | description |
|---|---|
| WorldGatedAttribute() | The default constructor. |
See Also
Section titled “See Also”- namespace Stellar.Abstractions.Diagnostics