Skip to content
Version 2.11.0
↓ Get the launcher

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 : Attribute
name description
WorldGatedAttribute() The default constructor.