Appearance
helix / Score
Class: Score
Defined in: core/frontend/nodes/score.ts:13
Extends
Implements
Constructors
Constructor
new Score(
objective,target,value?):Score
Defined in: core/frontend/nodes/score.ts:17
Parameters
objective
target
value?
number
Returns
Score
Overrides
Properties
clickEvent?
optionalclickEvent?:ClickEvent
Defined in: core/frontend/nodes/tellraw_part.ts:21
Inherited from
hoverEvent?
optionalhoverEvent?:HoverEvent
Defined in: core/frontend/nodes/tellraw_part.ts:22
Inherited from
objective
objective:
Objective
Defined in: core/frontend/nodes/score.ts:18
style
readonlystyle:TextStyle={}
Defined in: core/frontend/nodes/tellraw_part.ts:20
Accumulated styling; each fluent method writes one field here.
Inherited from
target
target:
ScoreTargetValue
Defined in: core/frontend/nodes/score.ts:19
type
type:
string="score"
Defined in: core/frontend/nodes/score.ts:14
Implementation of
value?
optionalvalue?:number
Defined in: core/frontend/nodes/score.ts:16
Methods
add()
add(
value,ctx?):this
Defined in: core/frontend/nodes/score.ts:62
Parameters
value
number
ctx?
Returns
this
applySet()
applySet(
ctx):this
Defined in: core/frontend/nodes/score.ts:135
Parameters
ctx
Returns
this
assign()
assign(
other,ctx?):this
Defined in: core/frontend/nodes/score.ts:99
this = other (scoreboard players operation … =).
Parameters
other
Score
ctx?
Returns
this
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
Colour this span. Prefer the typed Color.GOLD; a raw #RRGGBB hex string is also accepted for custom colours.
Parameters
color
Color | `#${string}`
Returns
this
Inherited from
copy()
copy(
ctx,score):void
Defined in: core/frontend/nodes/score.ts:74
Parameters
ctx
score
Score
Returns
void
divide()
divide(
other,ctx?):this
Defined in: core/frontend/nodes/score.ts:115
this /= other (integer division, floors toward −∞).
Parameters
other
Score
ctx?
Returns
this
equal()
equal(
input):ExpressionNode
Defined in: core/frontend/nodes/score.ts:26
Parameters
input
number | Score
Returns
greaterThan()
greaterThan(
input):ExpressionNode
Defined in: core/frontend/nodes/score.ts:36
Parameters
input
number | Score
Returns
invert()
invert():
Condition
Defined in: core/frontend/nodes/score.ts:156
Returns
Condition
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:46
Parameters
input
number | Score
Returns
max()
max(
other,ctx?):this
Defined in: core/frontend/nodes/score.ts:127
this = max(this, other) (>).
Parameters
other
Score
ctx?
Returns
this
min()
min(
other,ctx?):this
Defined in: core/frontend/nodes/score.ts:123
this = min(this, other) (<).
Parameters
other
Score
ctx?
Returns
this
minus()
minus(
other,ctx?):this
Defined in: core/frontend/nodes/score.ts:107
this -= other. (remove is taken for the literal scoreboard players remove.)
Parameters
other
Score
ctx?
Returns
this
modulo()
modulo(
other,ctx?):this
Defined in: core/frontend/nodes/score.ts:119
this %= other.
Parameters
other
Score
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:59
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:65
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:88
scoreboard players operation <this> <op> <other> - typed score-to-score arithmetic. The named verbs below (plus, times, …) delegate here; use this directly only for a dynamic operator. Returns this, so a run of operations on the same score chains: acc.times(k).plus(d).
The emitting context is the ambient one (the build/run/if callback you are inside). Pass ctx explicitly only to override it - e.g. when two contexts are in scope and you mean the outer one. See currentContext.
Parameters
op
ScoreOperator
other
Score
ctx?
Returns
this
plus()
plus(
other,ctx?):this
Defined in: core/frontend/nodes/score.ts:103
this += other. (add is taken for the literal scoreboard players add.)
Parameters
other
Score
ctx?
Returns
this
remove()
remove(
value,ctx?):this
Defined in: core/frontend/nodes/score.ts:68
Parameters
value
number
ctx?
Returns
this
set()
set(
value,ctx?):this
Defined in: core/frontend/nodes/score.ts:56
Parameters
value
number
ctx?
Returns
this
storeResult()
storeResult(
ctx,command):void
Defined in: core/frontend/nodes/score.ts:142
Parameters
ctx
command
Returns
void
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:131
Swap the two scores (><).
Parameters
other
Score
ctx?
Returns
this
times()
times(
other,ctx?):this
Defined in: core/frontend/nodes/score.ts:111
this *= other.
Parameters
other
Score
ctx?
Returns
this
toExecuteIf()
toExecuteIf():
string
Defined in: core/frontend/nodes/score.ts:152
Returns
string
underlined()
underlined(
value?):this
Defined in: core/frontend/nodes/tellraw_part.ts:43
Parameters
value?
boolean = true
Returns
this