Skip to content

twine / ActiveFlags

Class: ActiveFlags

Defined in: flags.ts:12

Owns the active scoreboard objective and the per-area flag score. The flag gates an area's whole subtree at tick time and is flipped by the generated <area>/activate / <area>/deactivate functions (see the factory).

Constructors

Constructor

new ActiveFlags(dp): ActiveFlags

Defined in: flags.ts:15

Parameters

dp

Datapack

Returns

ActiveFlags

Methods

score()

score(name): Score

Defined in: flags.ts:20

The flag score for area name, e.g. #vault active.

Parameters

name

string

Returns

Score


setDefault()

setDefault(ctx, name, active): void

Defined in: flags.ts:25

Set an area's initial flag value in load.

Parameters

ctx

FunctionContext

name

string

active

boolean

Returns

void

Released under the MIT License · Credits