Перейти к основному содержимому

Interface: Minecraft

Deprecated pre-release Minecraft API object.

Properties

afterEvents

readonly afterEvents: MinecraftAfterEvents


beforeEvents

readonly beforeEvents: MinecraftBeforeEvents


currentTick

readonly currentTick: number


gameRules

readonly gameRules: LegacyGameRules

Methods

command()

command(command): number

Execute an administrative command and return its success count.

Parameters

command

string

Returns

number


getBlock()

getBlock(position): LegacyBlockResult

Return legacy block data for an integer position.

Parameters

position

Vector3Dto

Returns

LegacyBlockResult


setBlock()

setBlock(key, position): boolean

Replace one block and report whether the operation succeeded.

Parameters

key

string

position

Vector3Dto

Returns

boolean


setBlocks()

setBlocks(states, options?): void

Apply multiple block replacements.

Parameters

states

readonly PositionDto[]

options?

SetBlocksOptions | null

Returns

void


systemMessage()

systemMessage(message): void

Broadcast a server chat message.

Parameters

message

string

Returns

void