Appearance
helix / Score
Class: Score<S> โ
Defined in: core/frontend/nodes/score.ts:21
A scoreboard slot; S is its Score.scale, so hovers and mismatched ops show the units.
Extends โ
Type Parameters โ
S โ
S extends number = number
Implements โ
Constructors โ
Constructor โ
new Score<
S>(objective,target,scale?):Score<S>
Defined in: core/frontend/nodes/score.ts:24
Parameters โ
objective โ
target โ
scale? โ
S = ...
Stored units per real unit: at 1000 the score holds thousandths. math formulas, literals and comparisons use real values and convert at the slot.
Returns โ
Score<S>
Overrides โ
Properties โ
clickEvent? โ
optionalclickEvent?:ClickEvent
Defined in: core/frontend/nodes/tellraw_part.ts:24
Inherited from โ
hoverEvent? โ
optionalhoverEvent?:HoverEvent
Defined in: core/frontend/nodes/tellraw_part.ts:25
Inherited from โ
objective โ
objective:
Objective
Defined in: core/frontend/nodes/score.ts:25
scale โ
readonlyscale:S
Defined in: core/frontend/nodes/score.ts:31
Stored units per real unit: at 1000 the score holds thousandths. math formulas, literals and comparisons use real values and convert at the slot.
style โ
readonlystyle:TextStyle={}
Defined in: core/frontend/nodes/tellraw_part.ts:23
Accumulated styling; each fluent method writes one field here.
Inherited from โ
target โ
target:
ScoreTargetValue
Defined in: core/frontend/nodes/score.ts:26
type โ
type:
string="score"
Defined in: core/frontend/nodes/score.ts:22
Implementation of โ
Methods โ
add() โ
add(
value,ctx?):this
Defined in: core/frontend/nodes/score.ts:144
scoreboard players add <this> <value>.
Parameters โ
value โ
number
ctx? โ
Returns โ
this
assign() โ
assign(
other,ctx?):this
Defined in: core/frontend/nodes/score.ts:225
this = other (scoreboard players operation ... =).
Parameters โ
other โ
Score<S>
ctx? โ
Returns โ
this
atLeast() โ
atLeast(
input):ExpressionNode
Defined in: core/frontend/nodes/score.ts:91
this >= input.
Parameters โ
input โ
number | Score<S>
Returns โ
atMost() โ
atMost(
input):ExpressionNode
Defined in: core/frontend/nodes/score.ts:96
this <= input.
Parameters โ
input โ
number | Score<S>
Returns โ
bold() โ
bold(
value?):this
Defined in: core/frontend/nodes/tellraw_part.ts:33
Parameters โ
value? โ
boolean = true
Returns โ
this
Inherited from โ
color() โ
color(
color):this
Defined in: core/frontend/nodes/tellraw_part.ts:28
Colours this span. Prefer Color.GOLD; #RRGGBB also works.
Parameters โ
color โ
Color | `#${string}`
Returns โ
this
Inherited from โ
countDown() โ
countDown(
ctx?):this
Defined in: core/frontend/nodes/score.ts:158
Takes one off while above zero, for cooldowns and timers ticked down each tick.
Parameters โ
ctx? โ
Returns โ
this
divide() โ
divide(
other,ctx?):this
Defined in: core/frontend/nodes/score.ts:241
this /= other (integer division, floors toward -infinity).
Parameters โ
other โ
Score<S>
ctx? โ
Returns โ
this
enable() โ
enable(
ctx?):this
Defined in: core/frontend/nodes/score.ts:203
scoreboard players enable <this>: lets the holder run /trigger on this trigger objective once.
Parameters โ
ctx? โ
Returns โ
this
equal() โ
equal(
input):ExpressionNode
Defined in: core/frontend/nodes/score.ts:76
this = input.
Parameters โ
input โ
number | Score<S>
Returns โ
font() โ
font(
id):this
Defined in: core/frontend/nodes/tellraw_part.ts:59
Renders this span in another font, e.g. minecraft:illageralt.
Parameters โ
id โ
string
Returns โ
this
Inherited from โ
get() โ
get(
ctx?):this
Defined in: core/frontend/nodes/score.ts:167
scoreboard players get <this>: the score as the command's result.
Parameters โ
ctx? โ
Returns โ
this
greaterThan() โ
greaterThan(
input):ExpressionNode
Defined in: core/frontend/nodes/score.ts:81
this > input.
Parameters โ
input โ
number | Score<S>
Returns โ
italic() โ
italic(
value?):this
Defined in: core/frontend/nodes/tellraw_part.ts:38
Parameters โ
value? โ
boolean = true
Returns โ
this
Inherited from โ
lessThan() โ
lessThan(
input):ExpressionNode
Defined in: core/frontend/nodes/score.ts:86
this < input.
Parameters โ
input โ
number | Score<S>
Returns โ
matches() โ
matches(
range):ExpressionNode
Defined in: core/frontend/nodes/score.ts:71
matches <range>: true when the score is in range.
Parameters โ
range โ
Returns โ
max() โ
max(
other,ctx?):this
Defined in: core/frontend/nodes/score.ts:253
this = max(this, other) (>).
Parameters โ
other โ
Score<S>
ctx? โ
Returns โ
this
min() โ
min(
other,ctx?):this
Defined in: core/frontend/nodes/score.ts:249
this = min(this, other) (<).
Parameters โ
other โ
Score<S>
ctx? โ
Returns โ
this
minus() โ
minus(
other,ctx?):this
Defined in: core/frontend/nodes/score.ts:233
this -= other. (remove is taken for the literal scoreboard players remove.)
Parameters โ
other โ
Score<S>
ctx? โ
Returns โ
this
modulo() โ
modulo(
other,ctx?):this
Defined in: core/frontend/nodes/score.ts:245
this %= other.
Parameters โ
other โ
Score<S>
ctx? โ
Returns โ
this
obfuscated() โ
obfuscated(
value?):this
Defined in: core/frontend/nodes/tellraw_part.ts:53
Parameters โ
value? โ
boolean = true
Returns โ
this
Inherited from โ
onClick() โ
onClick(
event):this
Defined in: core/frontend/nodes/tellraw_part.ts:71
Attach a click action (see the click helper).
Parameters โ
event โ
Returns โ
this
Inherited from โ
onHover() โ
onHover(
event):this
Defined in: core/frontend/nodes/tellraw_part.ts:77
Attach a hover tooltip (see the hover helper).
Parameters โ
event โ
Returns โ
this
Inherited from โ
operation() โ
operation(
op,other,ctx?):this
Defined in: core/frontend/nodes/score.ts:218
scoreboard players operation <this> <op> <other>. Chains; prefer the named verbs (plus, times...).
Emits into the ambient context; pass ctx to override. See currentContext.
Parameters โ
op โ
ScoreOperator
other โ
Score<S>
ctx? โ
Returns โ
this
plus() โ
plus(
other,ctx?):this
Defined in: core/frontend/nodes/score.ts:229
this += other. (add is taken for the literal scoreboard players add.)
Parameters โ
other โ
Score<S>
ctx? โ
Returns โ
this
readEntity() โ
readEntity(
who,path,ctx?):this
Defined in: core/frontend/nodes/score.ts:173
Reads the number at path on who into this, at this slot's scale.
Parameters โ
who โ
path โ
ctx? โ
Returns โ
this
remove() โ
remove(
value,ctx?):this
Defined in: core/frontend/nodes/score.ts:151
scoreboard players remove <this> <value>.
Parameters โ
value โ
number
ctx? โ
Returns โ
this
reset() โ
reset(
ctx?):this
Defined in: core/frontend/nodes/score.ts:197
scoreboard players reset <this> - un-set this holder's score entirely.
Parameters โ
ctx? โ
Returns โ
this
scaled() โ
scaled<
K>(scale):Score<K>
Defined in: core/frontend/nodes/score.ts:37
This slot holding scale units per real unit, e.g. .scaled(Unit.MM) for millimetres.
Type Parameters โ
K โ
K extends number
Parameters โ
scale โ
K
Returns โ
Score<K>
set() โ
set(
value,ctx?):this
Defined in: core/frontend/nodes/score.ts:137
scoreboard players set <this> <value>.
Parameters โ
value โ
number
ctx? โ
Returns โ
this
shadowColor() โ
shadowColor(
argb):this
Defined in: core/frontend/nodes/tellraw_part.ts:65
Sets the drop shadow's colour as packed ARGB, e.g. 0x80000000. 0 hides it (1.21.4+).
Parameters โ
argb โ
number
Returns โ
this
Inherited from โ
storeEntity() โ
storeEntity(
who,path,type?,factor?,ctx?):this
Defined in: core/frontend/nodes/score.ts:182
Writes this to path on who as a real number, times a unitless factor.
Parameters โ
who โ
path โ
type? โ
StoreNumType = "double"
factor? โ
number = 1
ctx? โ
Returns โ
this
strikethrough() โ
strikethrough(
value?):this
Defined in: core/frontend/nodes/tellraw_part.ts:48
Parameters โ
value? โ
boolean = true
Returns โ
this
Inherited from โ
swap() โ
swap(
other,ctx?):this
Defined in: core/frontend/nodes/score.ts:257
Swap the two scores (><).
Parameters โ
other โ
Score<S>
ctx? โ
Returns โ
this
times() โ
times(
other,ctx?):this
Defined in: core/frontend/nodes/score.ts:237
this *= other.
Parameters โ
other โ
Score<S>
ctx? โ
Returns โ
this
underlined() โ
underlined(
value?):this
Defined in: core/frontend/nodes/tellraw_part.ts:43
Parameters โ
value? โ
boolean = true
Returns โ
this