• Articles
  • Api Documentation
Show / Hide Table of Contents
  • DDSLoader
    • DDSImage
    • DDSImage.DDSHeader
    • DDSImage.DDSPixelFormat
    • DDSImage.HeaderFlags
    • DDSImage.PixelFormatFlags
    • DDSUnityExtensions
    • FourCC
  • LLBML
    • BallApi
    • CharacterApi
    • GraphicUtils
    • InputApi
    • LLBMLPlugin
    • LoadingInfo
    • LoadingScreen
    • PluginInfos
    • ProgressApi
    • ScreenApi
    • StateApi
  • LLBML.Audio
    • AudioAsset
    • AudioCache
    • AudioInfo
    • AudioUtils
  • LLBML.External
    • IntHelpers
    • Murmur3
  • LLBML.GameEvents
    • GameEvents
    • GameStateEvents
    • LobbyEventArgs
    • LobbyEvents
    • LobbyReadyArgs
    • MenuEvents
    • OnLobbyEnteredHandler
    • OnLobbyReadyHandler
    • OnMainMenuEnteredArgs
    • OnMainMenuEnteredHandler
    • OnMainMenuFirstEnteredHandler
    • OnPlayerJoinArgs
    • OnPlayerJoinHandler
    • OnStateChangeArgs
    • OnStateChangeHandler
    • OnUnlinkFromPlayerArgs
    • OnUnlinkFromPlayerHandler
    • OnUserCharacterPickArgs
    • OnUserCharacterPickHandler
    • OnUserSkinClickArgs
    • OnUserSkinClickHandler
  • LLBML.Graphic
    • Draw
    • Draw.Alignment
  • LLBML.Math
    • BinaryUtils
    • Boundsf
    • Floatf
    • Vector2f
    • Vector2i
  • LLBML.Messages
    • CustomMessage
    • MessageActions
    • MessageApi
    • MessageApi.OnReceiveMessageHandler
    • MessageEventArgs
  • LLBML.Networking
    • Channel
    • EnvelopeApi
    • EnvelopeApi.OnReceiveEnvelopeHandler
    • EnvelopeEventArgs
    • EP2PSend
    • EP2PSend.Enum
    • EP2PSend.Enum_Mapping
    • NetworkApi
    • Transaction
    • TransactionCode
    • TransactionState
  • LLBML.Players
    • Player
    • PlayerStatus
    • PlayerStatus.Enum
    • PlayerStatus.Enum_Mappings
    • Team
    • Team.Enum
    • Team.Enum_Mappings
  • LLBML.Settings
    • GameSettings
  • LLBML.States
    • GameState
    • GameState.Enum
    • GameState.Enum_Mapping
    • GameStates
    • GameStatesGameUtils
    • GameStatesLobbyUtils
    • PlayerLobbyState
  • LLBML.Texture
    • TextureUtils
  • LLBML.UI
    • Dialogs
  • LLBML.Utils
    • ArrayExtension
    • BepInRef
    • ControlledRandom
    • DebugUtils
    • EnumWrapper<T>
    • GenericCache<K, T>
    • GenericUtils
    • Hash<T>
    • IByteable
    • ModDependenciesUtils
    • ModdingFolder
    • PatchUtils
    • StringUtils

Class MessageApi

A class to send, receive and edit messages

Inheritance
System.Object
MessageApi
Inherited Members
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.ToString()
Namespace: LLBML.Messages
Assembly: LLBModdingLib.dll
Syntax
public static class MessageApi

Methods

RegisterCustomMessage(PluginInfo, UInt16, String, MessageActions)

Register a custom message that will be assiociated with the provided code and call the various actions contained into it's MessageActions

Declaration
public static CustomMessage RegisterCustomMessage(PluginInfo pluginInfo, ushort messageCode, string messageName, MessageActions messageActions)
Parameters
Type Name Description
BepInEx.PluginInfo pluginInfo

The BepInEx.PluginInfo of the requesting plugin

System.UInt16 messageCode

The code to register

System.String messageName

The name/reason for the message code

MessageActions messageActions

A MessageActions containing the actions to do when a message with the provided code is received

Returns
Type Description
CustomMessage

RegisterCustomMessage(PluginInfo, UInt16, String, Action<Message>)

Register a custom message that will be assiociated with the provided code and call the provided method when received

Declaration
public static CustomMessage RegisterCustomMessage(PluginInfo pluginInfo, ushort messageCode, string messageName, Action<Message> onReceiveMessageCallback)
Parameters
Type Name Description
BepInEx.PluginInfo pluginInfo

The BepInEx.PluginInfo of the requesting plugin

System.UInt16 messageCode

The code to register

System.String messageName

The name/reason for the message code

System.Action<Message> onReceiveMessageCallback

The method to call when receiving the message

Returns
Type Description
CustomMessage

SubscribeToVanillaMessage(PluginInfo, Msg, String, MessageActions)

Subscribe to a vanilla message and calls back the actions in the MessageActions

Declaration
public static CustomMessage SubscribeToVanillaMessage(PluginInfo pluginInfo, Msg messageCode, string messageName, MessageActions messageActions)
Parameters
Type Name Description
BepInEx.PluginInfo pluginInfo

The BepInEx.PluginInfo of the requesting plugin

Msg messageCode

The code to subscribe to

System.String messageName

The name/reason for the message code

MessageActions messageActions

A MessageActions containing the actions to do when a message with the provided code is received

Returns
Type Description
CustomMessage

SubscribeToVanillaMessage(PluginInfo, Msg, String, Action<Message>)

Subscribe to a vanilla message and calls back the actions in the MessageActions

Declaration
public static CustomMessage SubscribeToVanillaMessage(PluginInfo pluginInfo, Msg messageCode, string messageName, Action<Message> onReceiveMessageCallback)
Parameters
Type Name Description
BepInEx.PluginInfo pluginInfo

The BepInEx.PluginInfo of the requesting plugin

Msg messageCode

The code to subscribe to

System.String messageName

The name/reason for the message code

System.Action<Message> onReceiveMessageCallback

The method to call when receiving the message

Returns
Type Description
CustomMessage

UnregisterCustomMessage(PluginInfo, UInt16)

Removes the custom message associated with a code

Declaration
public static bool UnregisterCustomMessage(PluginInfo pluginInfo, ushort messageCode)
Parameters
Type Name Description
BepInEx.PluginInfo pluginInfo

The BepInEx.PluginInfo of the requesting plugin

System.UInt16 messageCode

The code to unregister

Returns
Type Description
System.Boolean

True if the message was successfuly unregistered, false otherwise

UnsubscribeToVanillaMessage(PluginInfo, Byte, CustomMessage)

Removes the custom message associated with a code

Declaration
public static bool UnsubscribeToVanillaMessage(PluginInfo pluginInfo, byte messageCode, CustomMessage customMessage)
Parameters
Type Name Description
BepInEx.PluginInfo pluginInfo

The BepInEx.PluginInfo of the requesting plugin

System.Byte messageCode

The code that was subscribe to

CustomMessage customMessage

The customMessage to unregister

Returns
Type Description
System.Boolean

True if the message was successfuly unregistered, false otherwise

In This Article
Back to top Generated by DocFX