Skip to main content

TeleporterHandler

class ThaumielMapEditor.API.Components

Overview​

Properties​

NameTypeAccessDescription
TeleporterTeleporterObjectgetGets the ThaumielMapEditor.API.Blocks.ServerObjects.TeleporterObject this handler is managing.

Fields​

NameTypeDescription
PlayerCooldownsDictionary<Player, float>Tracks per-player cooldown expiry times. Each entry maps a `LabApi.Features.Wrap…

Methods​

SignatureReturnsDescription
ForcePlayerCooldown(Player, float)voidForces a minimum cooldown on a player regardless of teleporter settings, used to…
HasFlagFast(TeleporterFlags)boolNo description
Init(TeleporterObject)voidInitializes this ThaumielMapEditor.API.Components.TeleporterHandler instance w…

Properties​

Teleporter​

Type: TeleporterObject Access: get

Gets the ThaumielMapEditor.API.Blocks.ServerObjects.TeleporterObject this handler is managing.


Fields​

PlayerCooldowns​

Type: Dictionary<Player, float>

Tracks per-player cooldown expiry times. Each entry maps a LabApi.Features.Wrappers.Player to the UnityEngine.Time.time value at which their cooldown expires.


Methods​

ForcePlayerCooldown​

ForcePlayerCooldown
public void ForcePlayerCooldown(
Player player,
float duration
)

Forces a minimum cooldown on a player regardless of teleporter settings, used to prevent immediate return teleportation.

Parameters​

NameTypeDescription
playerPlayer
durationfloat

HasFlagFast​

HasFlagFast
public bool HasFlagFast(TeleporterFlags flag)

Parameters​

NameTypeDescription
flagTeleporterFlags

Returns​

bool


Init​

Init
public void Init(TeleporterObject teleporter)

Initializes this ThaumielMapEditor.API.Components.TeleporterHandler instance with the given teleporter.

Parameters​

NameTypeDescription
teleporterTeleporterObjectThe ThaumielMapEditor.API.Blocks.ServerObjects.TeleporterObject that defines this teleporter's configuration.