JsonWidget

Values:

Functions:

Operations:

OperationReturn typeDescription
JsonWidget == JsonWidgetbooleanChecks if two instances of JsonWidget refer to the same JsonWidget.

name string

Get:

Client only

Get the name of the jsonWidget.


getEffect(jsonWidget, name)

Client only

Gets an effect from a widget.

Parameters:

TypeNameDescription
JsonWidgetjsonWidgetThe JsonWidget.
stringnameThe name of the effect on the json widget to get.

Returns:

TypeDescription
EffectThe effect.

getUserString(jsonWidget, key)

Client only

Gets a string associated with the given key from a json widget.

Parameters:

TypeNameDescription
JsonWidgetjsonWidgetThe JsonWidget.
stringkeyThe key connected to the value.

Returns:

TypeDescription
string value The value associated with the key.

isEffectDone(jsonWidget, name)

Client only

Returns if a named effect is done or not.

Parameters:

TypeNameDescription
JsonWidgetjsonWidgetThe JsonWidget.
stringnameThe name of the effect.

Returns:

TypeDescription
booleanTrue if the effect is done, false otherwise.

isEffectPlaying(jsonWidget, name)

Client only

Returns if a named effect is playing or not.

Parameters:

TypeNameDescription
JsonWidgetjsonWidgetThe JsonWidget.
stringnameThe name of the effect.

Returns:

TypeDescription
booleanTrue if the effect is playing, false otherwise.

setPosition(jsonWidget, x, y)

Client only

Sets the position of the widget. This will not change the json data position.

Parameters:

TypeNameDescription
JsonWidgetjsonWidgetThe JsonWidget.
integerxThe x position.
integeryThe y position.

setPreview(jsonWidget, uuid)

Client only

Sets the item preview uuid for a json widget. Passing nil clears the preview.

Parameters:

TypeNameDescription
JsonWidgetjsonWidgetThe JsonWidget.
uuiduuidThe item uuid.

setPreview(jsonWidget, string)

Client only

Sets the blueprint preview path for a json widget. Passing nil clears the preview.

Parameters:

TypeNameDescription
JsonWidgetjsonWidgetThe JsonWidget.
stringstringThe blueprint path.

setPreview()

Client only


setUserString(jsonWidget, key, value)

Client only

Sets a custom string on a json widget that can be fetched using the key.

Parameters:

TypeNameDescription
JsonWidgetjsonWidgetThe JsonWidget.
stringkeyThe key connected to the value.
stringvalueThe value being written onto the widget.

setVisible(jsonWidget, stopImmediate)

Client only

Sets the visibility of a widget.

Parameters:

TypeNameDescription
JsonWidgetjsonWidgetThe JsonWidget.
booleanstopImmediateThe widgets new visibility state.

startEffect(jsonWidget, name)

Client only

Starts the effect applied to the widget.

Parameters:

TypeNameDescription
JsonWidgetjsonWidgetThe JsonWidget.
stringnameThe name of the effect on the json widget to start.

stopEffect(jsonWidget, name, stopImmediate?)

Client only

Stops the effect applied to the widget.

Parameters:

TypeNameDescription
JsonWidgetjsonWidgetThe JsonWidget.
stringnameThe name of the effect to stop.
booleanstopImmediate?If the effect should stop immediately. (Optional) (Defaults to false)