Skip to content

@minecraft/server


@minecraft/server / AimAssistRegistry

Class: AimAssistRegistry ​

Defined in: @minecraft/server/index.d.ts:3629

A container for APIs related to the world's aim-assist settings.

Properties ​

DefaultCategoryId ​

readonly static DefaultCategoryId: "minecraft:default" = 'minecraft:default'

Defined in: @minecraft/server/index.d.ts:3637

Remarks ​

The default aim-assist category Id that is used when not otherwise specified.


DefaultPresetId ​

readonly static DefaultPresetId: "minecraft:aim_assist_default" = 'minecraft:aim_assist_default'

Defined in: @minecraft/server/index.d.ts:3644

Remarks ​

The default aim-assist preset Id that is used when not otherwise specified.

Methods ​

addCategory() ​

addCategory(category): AimAssistCategory

Defined in: @minecraft/server/index.d.ts:3665

Parameters ​

category ​

AimAssistCategorySettings

The category settings used to create the new category.

Returns ​

AimAssistCategory

The created category handle.

Remarks ​

Adds an aim-assist category to the registry.

This function can't be called in restricted-execution mode.

Throws ​

This function can throw errors.

minecraftcommon.EngineError

Error

minecraftcommon.InvalidArgumentError

NamespaceNameError


addPreset() ​

addPreset(preset): AimAssistPreset

Defined in: @minecraft/server/index.d.ts:3686

Parameters ​

preset ​

AimAssistPresetSettings

The preset settings used to create the new preset.

Returns ​

AimAssistPreset

The created preset handle.

Remarks ​

Adds an aim-assist preset to the registry.

This function can't be called in restricted-execution mode.

Throws ​

This function can throw errors.

minecraftcommon.EngineError

Error

minecraftcommon.InvalidArgumentError

NamespaceNameError


getCategories() ​

getCategories(): AimAssistCategory[]

Defined in: @minecraft/server/index.d.ts:3694

Returns ​

AimAssistCategory[]

An array of all available category objects.

Remarks ​

Gets all available categories in the registry.


getCategory() ​

getCategory(categoryId): AimAssistCategory | undefined

Defined in: @minecraft/server/index.d.ts:3705

Parameters ​

categoryId ​

string

Returns ​

AimAssistCategory | undefined

The category object if it exists, otherwise returns undefined.

Remarks ​

Gets the category associated with the provided Id.

This function can't be called in restricted-execution mode.


getPreset() ​

getPreset(presetId): AimAssistPreset | undefined

Defined in: @minecraft/server/index.d.ts:3717

Parameters ​

presetId ​

string

The Id of the preset to retrieve. Must have a namespace.

Returns ​

AimAssistPreset | undefined

The preset object if it exists, otherwise returns undefined.

Remarks ​

Gets the preset associated with the provided Id.

This function can't be called in restricted-execution mode.


getPresets() ​

getPresets(): AimAssistPreset[]

Defined in: @minecraft/server/index.d.ts:3725

Returns ​

AimAssistPreset[]

An array of all available preset objects.

Remarks ​

Gets all available presets in the registry.