Skip to content

@minecraft/server


@minecraft/server / PlayerInputPermissions

Class: PlayerInputPermissions ​

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

Contains APIs to enable/disable player input permissions.

Methods ​

isPermissionCategoryEnabled() ​

isPermissionCategoryEnabled(permissionCategory): boolean

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

Parameters ​

permissionCategory ​

InputPermissionCategory

Returns ​

boolean

Remarks ​

Returns true if an input permission is enabled.

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

Throws ​

This function can throw errors.


setPermissionCategory() ​

setPermissionCategory(permissionCategory, isEnabled): void

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

Parameters ​

permissionCategory ​

InputPermissionCategory

isEnabled ​

boolean

Returns ​

void

Remarks ​

Enable or disable an input permission. When enabled the input will work, when disabled will not work.

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

Throws ​

This function can throw errors.