Client

Barotrauma Client class with some additional functions and fields

Barotrauma source code: Client.cs

Functions

AddKickVote(voter)

AddKickVote

Parameters

  • voter Networking.Client

AddressMatches(address)

AddressMatches

Parameters

  • address Networking.Address

Returns

  • bool

Ban(reason, seconds)

Ban

Parameters

  • seconds number

Ban(reason, range, seconds)

Ban a client.

Parameters

  • reason

  • range

  • seconds

CheckPermission(permissions)

Checks permissions, Client.Permissions.

Parameters

  • permissions

Client(name, sessionId)

Client

Parameters

  • sessionId number

Client.BanPlayer(player, reason, range, seconds)

BanPlayer

Parameters

  • range bool

  • seconds number

Client.IsValidName(name, serverSettings)

IsValidName

Parameters

  • serverSettings Networking.ServerSettings

Returns

  • bool

Client.ReadPermissions(inc, permissions, permittedCommands)

ReadPermissions

Parameters

  • inc Networking.IReadMessage

  • permissions Networking.ClientPermissions&

  • permittedCommands List`1&

Client.SanitizeName(name)

SanitizeName

Parameters

Returns

Client.Unban(player, endpoint)

Unban a client.

Parameters

  • player

  • endpoint

Client.UnbanPlayer(playerName)

UnbanPlayer

Parameters

Client.UpdateKickVotes(connectedClients)

UpdateKickVotes

Parameters

  • connectedClients IReadOnlyList

Dispose()

Dispose

Equals(obj)

Equals

Parameters

  • obj Object

Returns

  • bool

GetHashCode()

GetHashCode

Returns

  • number

GetType()

GetType

Returns

  • Type

GetVote(voteType)

GetVote

Parameters

  • voteType Networking.VoteType

Returns

  • T

GivePermission(permission)

GivePermission

Parameters

  • permission Networking.ClientPermissions

HasKickVoteFrom(voter)

HasKickVoteFrom

Parameters

  • voter Networking.Client

Returns

  • bool

HasKickVoteFromSessionId(id)

HasKickVoteFromSessionId

Parameters

  • id number

Returns

  • bool

HasPermission(permission)

HasPermission

Parameters

  • permission Networking.ClientPermissions

Returns

  • bool

InitClientSync()

InitClientSync

Kick(reason)

Kick a client.

Parameters

  • reason

ReadPermissions(inc)

ReadPermissions

Parameters

  • inc Networking.IReadMessage

RemoveKickVote(voter)

RemoveKickVote

Parameters

  • voter Networking.Client

RemovePermission(permission)

RemovePermission

Parameters

  • permission Networking.ClientPermissions

ResetVotes()

ResetVotes

ResetVotes(resetKickVotes)

ResetVotes

Parameters

  • resetKickVotes bool

SessionOrAccountIdMatches(userId)

SessionOrAccountIdMatches

Parameters

Returns

  • bool

SetClientCharacter(character)

Sets the client character.

Parameters

  • character

SetPermissions(permissions, permittedConsoleCommands)

SetPermissions

Parameters

  • permissions Networking.ClientPermissions

  • permittedConsoleCommands IEnumerable

SetPermissions(permissions, permittedConsoleCommands)

SetPermissions

Parameters

  • permissions Networking.ClientPermissions

  • permittedConsoleCommands IEnumerable

SetVote(voteType, value)

SetVote

Parameters

  • voteType Networking.VoteType

  • value Object

ToString()

ToString

Returns

TryTakeOverBot(botCharacter)

TryTakeOverBot

Parameters

Returns

  • bool

UpdateVoipSound()

UpdateVoipSound

WritePermissions(msg)

WritePermissions

Parameters

  • msg Networking.IWriteMessage

Fields

AccountId

AccountId, field of type Option

  • AccountId

AccountInfo

AccountInfo, field of type Networking.AccountInfo

  • AccountInfo

AllowKicking

AllowKicking, field of type bool

  • AllowKicking

AssignedJob

AssignedJob, field of type JobVariant

  • AssignedJob

Character

Character, field of type Character

  • Character

CharacterID

CharacterID, field of type number

  • CharacterID

CharacterInfo

CharacterInfo, field of type CharacterInfo

  • CharacterInfo

ChatMsgQueue

ChatMsgQueue, field of type table

  • ChatMsgQueue

ChatSpamCount

ChatSpamCount, field of type number

  • ChatSpamCount

ChatSpamSpeed

ChatSpamSpeed, field of type number

  • ChatSpamSpeed

ChatSpamTimer

ChatSpamTimer, field of type number

  • ChatSpamTimer

Client.ClientList

Client.ClientList, field of type IReadOnlyList

Client.MaxNameLength

Client.MaxNameLength, field of type number

Client.MaxVoiceChatBoost

Client.MaxVoiceChatBoost, field of type number

Client.NameChangeCoolDown

Client.NameChangeCoolDown, field of type TimeSpan

Connection

Connection, field of type Networking.NetworkConnection

  • Connection

DeleteDisconnectedTimer

DeleteDisconnectedTimer, field of type number

  • DeleteDisconnectedTimer

EntityEventLastSent

EntityEventLastSent, field of type table

  • EntityEventLastSent

FirstNewEventID

FirstNewEventID, field of type number

  • FirstNewEventID

GivenAchievements

GivenAchievements, field of type HashSet

  • GivenAchievements

HasPermissions

HasPermissions, field of type bool

  • HasPermissions

HasSpawned

HasSpawned, field of type bool

  • HasSpawned

InGame

InGame, field of type bool

  • InGame

IsDownloading

IsDownloading, field of type bool

  • IsDownloading

IsOwner

IsOwner, field of type bool

  • IsOwner

JobPreferences

JobPreferences, field of type table

  • JobPreferences

JoinTime

JoinTime, field of type DateTime

  • JoinTime

Karma

Karma, field of type number

  • Karma

KarmaKickCount

KarmaKickCount, field of type number

  • KarmaKickCount

KickAFKTimer

KickAFKTimer, field of type number

  • KickAFKTimer

KickVoteCount

KickVoteCount, field of type number

  • KickVoteCount

Language

Language, field of type LanguageIdentifier

  • Language

LastCampaignSaveSendTime

LastCampaignSaveSendTime, field of type ValueTuple

  • LastCampaignSaveSendTime

LastChatMsgQueueID

LastChatMsgQueueID, field of type number

  • LastChatMsgQueueID

LastNameChangeTime

LastNameChangeTime, field of type DateTime

  • LastNameChangeTime

LastRecvCampaignSave

LastRecvCampaignSave, field of type number

  • LastRecvCampaignSave

LastRecvCampaignUpdate

LastRecvCampaignUpdate, field of type table

  • LastRecvCampaignUpdate

LastRecvChatMsgID

LastRecvChatMsgID, field of type number

  • LastRecvChatMsgID

LastRecvClientListUpdate

LastRecvClientListUpdate, field of type number

  • LastRecvClientListUpdate

LastRecvEntityEventID

LastRecvEntityEventID, field of type number

  • LastRecvEntityEventID

LastRecvLobbyUpdate

LastRecvLobbyUpdate, field of type number

  • LastRecvLobbyUpdate

LastRecvServerSettingsUpdate

LastRecvServerSettingsUpdate, field of type number

  • LastRecvServerSettingsUpdate

LastSentChatMessages

LastSentChatMessages, field of type table

  • LastSentChatMessages

LastSentChatMsgID

LastSentChatMsgID, field of type number

  • LastSentChatMsgID

LastSentEntityEventID

LastSentEntityEventID, field of type number

  • LastSentEntityEventID

LastSentServerSettingsUpdate

LastSentServerSettingsUpdate, field of type number

  • LastSentServerSettingsUpdate

MidRoundSyncTimeOut

MidRoundSyncTimeOut, field of type number

  • MidRoundSyncTimeOut

Muted

Muted, field of type bool

  • Muted

MutedLocally

MutedLocally, field of type bool

  • MutedLocally

Name

Name, field of type string

  • Name

NameId

NameId, field of type number

  • NameId

NeedsMidRoundSync

NeedsMidRoundSync, field of type bool

  • NeedsMidRoundSync

PendingName

PendingName, field of type string

  • PendingName

PendingPositionUpdates

PendingPositionUpdates, field of type Queue

  • PendingPositionUpdates

Permissions

Permissions, field of type Networking.ClientPermissions

  • Permissions

PermittedConsoleCommands

PermittedConsoleCommands, field of type HashSet

  • PermittedConsoleCommands

Ping

Ping, field of type number

  • Ping

PositionUpdateLastSent

PositionUpdateLastSent, field of type table

  • PositionUpdateLastSent

PreferredJob

PreferredJob, field of type Identifier

  • PreferredJob

PreferredTeam

PreferredTeam, field of type CharacterTeamType

  • PreferredTeam

RadioNoise

RadioNoise, field of type number

  • RadioNoise

ReadyToStart

ReadyToStart, field of type bool

  • ReadyToStart

RejectedName

RejectedName, field of type string

  • RejectedName

SessionId

SessionId, field of type number

  • SessionId

SpectateOnly

SpectateOnly, field of type bool

  • SpectateOnly

SpectatePos

SpectatePos, field of type ?Microsoft.Xna.Framework.Vector2

  • SpectatePos

Spectating

Spectating, field of type bool

  • Spectating

SteamID

SteamID, field of type number

  • SteamID

TeamID

TeamID, field of type CharacterTeamType

  • TeamID

UnreceivedEntityEventCount

UnreceivedEntityEventCount, field of type number

  • UnreceivedEntityEventCount

UsingFreeCam

UsingFreeCam, field of type bool

  • UsingFreeCam

VoiceEnabled

VoiceEnabled, field of type bool

  • VoiceEnabled

VoiceVolume

VoiceVolume, field of type number

  • VoiceVolume

VoipQueue

VoipQueue, field of type Networking.VoipQueue

  • VoipQueue

VoipServerDecoder

VoipServerDecoder, field of type VoipServerDecoder

  • VoipServerDecoder

VoipSound

VoipSound, field of type Sounds.VoipSound

  • VoipSound

WaitForNextRoundRespawn

WaitForNextRoundRespawn, field of type ?bool

  • WaitForNextRoundRespawn