Skip to main content
Version: 1.1.1

Class NetworkedEventAttribute

Namespace: ReadyM.SDK.Attributes
Assembly: ReadyM.SDK.dll

Declares a struct as a network event: a message sent to the server or other players, which any mod may validate, change, cancel, or observe.

[AttributeUsage(AttributeTargets.Struct)]
public sealed class NetworkedEventAttribute : Attribute

Inheritance​

object ← Attribute ← NetworkedEventAttribute

Inherited Members​

Attribute.GetCustomAttributes(MemberInfo, Type), Attribute.GetCustomAttributes(MemberInfo, Type, bool), Attribute.GetCustomAttributes(MemberInfo), Attribute.GetCustomAttributes(MemberInfo, bool), Attribute.IsDefined(MemberInfo, Type), Attribute.IsDefined(MemberInfo, Type, bool), Attribute.GetCustomAttribute(MemberInfo, Type), Attribute.GetCustomAttribute(MemberInfo, Type, bool), Attribute.GetCustomAttributes(ParameterInfo), Attribute.GetCustomAttributes(ParameterInfo, Type), Attribute.GetCustomAttributes(ParameterInfo, Type, bool), Attribute.GetCustomAttributes(ParameterInfo, bool), Attribute.IsDefined(ParameterInfo, Type), Attribute.IsDefined(ParameterInfo, Type, bool), Attribute.GetCustomAttribute(ParameterInfo, Type), Attribute.GetCustomAttribute(ParameterInfo, Type, bool), Attribute.GetCustomAttributes(Module, Type), Attribute.GetCustomAttributes(Module), Attribute.GetCustomAttributes(Module, bool), Attribute.GetCustomAttributes(Module, Type, bool), Attribute.IsDefined(Module, Type), Attribute.IsDefined(Module, Type, bool), Attribute.GetCustomAttribute(Module, Type), Attribute.GetCustomAttribute(Module, Type, bool), Attribute.GetCustomAttributes(Assembly, Type), Attribute.GetCustomAttributes(Assembly, Type, bool), Attribute.GetCustomAttributes(Assembly), Attribute.GetCustomAttributes(Assembly, bool), Attribute.IsDefined(Assembly, Type), Attribute.IsDefined(Assembly, Type, bool), Attribute.GetCustomAttribute(Assembly, Type), Attribute.GetCustomAttribute(Assembly, Type, bool), Attribute.Equals(object?), Attribute.GetHashCode(), Attribute.Match(object?), Attribute.IsDefaultAttribute(), Attribute.TypeId, object.GetType(), object.ToString(), object.Equals(object?), object.Equals(object?, object?), object.ReferenceEquals(object?, object?), object.GetHashCode()

Remarks​

Declare it in your mod's Common project, so both sides can refer to it.

Constructors​

NetworkedEventAttribute(EventScope, Policy)​

Declares a struct as a network event: a message sent to the server or other players, which any mod may validate, change, cancel, or observe.

public NetworkedEventAttribute(EventScope scope, Policy policy)

Parameters​

scope EventScope

Who receives the event.

policy Policy

Which players can raise the event. The server always can.

Remarks​

Declare it in your mod's Common project, so both sides can refer to it.

Properties​

Policy​

Who may raise the event.

public Policy Policy { get; }

Property Value​

Policy

Reject​

An optional, serializable type, that is sent back to the client when the event is cancelled. Used to return a reason for the cancellation, or to return a value that the client can use to recover from the cancellation.

public Type? Reject { get; set; }

Property Value​

Type?

Scope​

Who receives the event.

public EventScope Scope { get; }

Property Value​

EventScope