Skip to main content

PlayerExtensions

static class ThaumielMapEditor.API.Extensions

Overview​

Methods​

SignatureReturnsDescription
SendFakeRPC(Player, UInt32, Type, string, int, object[])voidSends a fake RPC message to a LabApi.Features.Wrappers.Player
TryGet(ReferenceHub, Player&)boolTries to get a LabApi.Features.Wrappers.Player from a ReferenceHub

Methods​

SendFakeRPC​

SendFakeRPC
public void SendFakeRPC(
Player player,
UInt32 netId,
Type type,
string functionName,
int componentIndex,
object[] objects
)

Sends a fake RPC message to a LabApi.Features.Wrappers.Player

Parameters​

NameTypeDescription
playerPlayerThe LabApi.Features.Wrappers.Player to send the RPC to
netIdUInt32The netid of the object that will be affected.
typeTypeThe System.Type of the RPC message.
functionNamestringThe name of the RPC message method
componentIndexint
objectsobject[]The

TryGet​

TryGet
public bool TryGet(
ReferenceHub hub,
Player& player
)

Tries to get a LabApi.Features.Wrappers.Player from a ReferenceHub

Parameters​

NameTypeDescription
hubReferenceHubThe ReferenceHub to check.
playerPlayer&The LabApi.Features.Wrappers.Player if found.

Returns​

bool — true if the LabApi.Features.Wrappers.Player was found else returns false if no LabApi.Features.Wrappers.Player was found.