跳到主要内容

Class: GraphicsSettings

Settings category that manages GraphicsSettingsProperty configurations.

Constructors

new GraphicsSettings()

private new GraphicsSettings(): GraphicsSettings

Returns

GraphicsSettings

Methods

get()

get<T>(property): GraphicsSettingsPropertyTypeMap[T]

Type parameters

Type parameter
T extends ShowInvisibleBlocks

Parameters

ParameterTypeDescription
propertyTProperty identifier.

Returns

GraphicsSettingsPropertyTypeMap[T]

Returns the property value if it is found. If the property is not available, it returns undefined.

Remarks

Retrieves a graphics settings property value.


getAll()

getAll(): GraphicsSettingsPropertyTypeMap

Returns

GraphicsSettingsPropertyTypeMap

Returns a property value map for all available properties.

Remarks

Retrieves all graphics settings properties and their values.


set()

set<T>(property, value): void

Type parameters

Type parameter
T extends ShowInvisibleBlocks

Parameters

ParameterTypeDescription
propertyTProperty identifier.
valueGraphicsSettingsPropertyTypeMap[T]New property value.

Returns

void

Remarks

Modifies a graphics settings property value.

Throws

This function can throw errors.


setAll()

setAll(properties): void

Parameters

ParameterTypeDescription
propertiesGraphicsSettingsPropertyTypeMapProperty map to set available property values. If the
property is not defined in the map, it will not be modified.

Returns

void

Remarks

Modify multiple graphics settings properties.

Throws

This function can throw errors.