Skip to content
On this page

Athena.player.safe

Functions

addArmour

Usage

Athena.player.safe.addArmour(player, value, exactValue?, doNotInvokeEventCall?): void

Safely add armour to this player.

Parameters

NameTypeDefault valueDescription
playerPlayerundefined-
valuenumberundefined1-100
exactValuebooleanfalse
doNotInvokeEventCallbooleanfalse-

Returns

void

Defined in

server/player/safe.ts:108


addHealth

Usage

Athena.player.safe.addHealth(player, value, exactValue?, doNotInvokeEventCall?): any

Safely add health to this player.

Parameters

NameTypeDefault valueDescription
playerPlayerundefinedAn alt:V Player Entity
valuenumberundefined99-199
exactValuebooleanfalse
doNotInvokeEventCallbooleanfalse-

Returns

any

Defined in

server/player/safe.ts:41


override

Usage

Athena.player.safe.override(functionName, callback): any

Used to override any internal safe setter functions

Parameters

NameType
functionName"setPosition"
callback(player: Player, x: number, y: number, z: number, doNotInvokeEventCall: boolean) => void

Returns

any

Defined in

server/player/safe.ts:196

Usage

Athena.player.safe.override(functionName, callback): any

Used to override any internal safe setter functions

Parameters

NameType
functionName"addHealth"
callback(player: Player, value: number, exactValue: boolean, doNotInvokeEventCall: boolean) => any

Returns

any

Defined in

server/player/safe.ts:197

Usage

Athena.player.safe.override(functionName, callback): any

Used to override any internal safe setter functions

Parameters

NameType
functionName"subHealth"
callback(player: Player, value: number, exactValue: boolean, doNotInvokeEventCall: boolean) => any

Returns

any

Defined in

server/player/safe.ts:198

Usage

Athena.player.safe.override(functionName, callback): any

Used to override any internal safe setter functions

Parameters

NameType
functionName"addArmour"
callback(player: Player, value: number, exactValue: boolean, doNotInvokeEventCall: boolean) => void

Returns

any

Defined in

server/player/safe.ts:199

Usage

Athena.player.safe.override(functionName, callback): any

Used to override any internal safe setter functions

Parameters

NameType
functionName"subArmour"
callback(player: Player, value: number, exactValue: boolean, doNotInvokeEventCall: boolean) => void

Returns

any

Defined in

server/player/safe.ts:200

Usage

Athena.player.safe.override(functionName, callback): any

Used to override any internal safe setter functions

Parameters

NameType
functionName"setDimension"
callback(player: Player, value: number) => any

Returns

any

Defined in

server/player/safe.ts:201


setDimension

Usage

Athena.player.safe.setDimension(player, value): any

Set the player's dimension safely.

Parameters

NameTypeDescription
playerPlayerAn alt:V Player Entity
valuenumber

Returns

any

Defined in

server/player/safe.ts:176


setPosition

Usage

Athena.player.safe.setPosition(player, x, y, z, doNotInvokeEventCall?): void

Safely set a player's position.

Parameters

NameTypeDefault value
playerPlayerundefined
xnumberundefined
ynumberundefined
znumberundefined
doNotInvokeEventCallbooleanfalse

Returns

void

Defined in

server/player/safe.ts:12


subArmour

Usage

Athena.player.safe.subArmour(player, value, exactValue?, doNotInvokeEventCall?): void

Safely subtracts armour to this player.

Parameters

NameTypeDefault valueDescription
playerPlayerundefined-
valuenumberundefined1-100
exactValuebooleanfalse
doNotInvokeEventCallbooleanfalse-

Returns

void

Defined in

server/player/safe.ts:141


subHealth

Usage

Athena.player.safe.subHealth(player, value, exactValue?, doNotInvokeEventCall?): any

Safely subtract health to this player.

Parameters

NameTypeDefault valueDescription
playerPlayerundefinedAn alt:V Player Entity
valuenumberundefined99-199
exactValuebooleanfalse
doNotInvokeEventCallbooleanfalse-

Returns

any

Defined in

server/player/safe.ts:75

Created by Stuyk | Est. 2020