Skip to main content

ConsoleEventsPatch

A class in TavernLib, TavernLib.Patches.

Harmony patches that raise the game's ConsoleEvents.PlayerJoined and PlayerLeft events when a player joins or leaves. Server.

Constructors​

MemberWhat it is
ConsoleEventsPatch()Created by TavernLib; mods don't make one.

Methods​

MemberWhat it is
static void PlayerJoinPatch(Player __instance)Postfix on Player.InitializePlayerOnServer that raises ConsoleEvents.PlayerJoined for that player.
static void PlayerLeavePatch(ServerPlayerConnectionHandlerOld __instance)Postfix on the ServerPlayerConnectionHandlerOld constructor that hooks UserLeft to raise ConsoleEvents.PlayerLeft when a player leaves.