The BlockRecordPlayerComponent class in @minecraft/server.
Class in @minecraft/server
Extends BlockComponent
import { BlockRecordPlayerComponent } from '@minecraft/server';Constructor
Section titled “Constructor”protected constructor();Properties
Section titled “Properties”componentId
Section titled “componentId”static read-only
static readonly componentId = 'minecraft:record_player';Methods
Section titled “Methods”ejectRecord
Section titled “ejectRecord”ejectRecord(): void;getRecord
Section titled “getRecord”getRecord(): ItemStack | undefined;Returns
ItemStack | undefinedTypes
isPlaying
Section titled “isPlaying”isPlaying(): boolean;Returns
booleanpauseRecord
Section titled “pauseRecord”pauseRecord(): void;playRecord
Section titled “playRecord”playRecord(): void;setRecord
Section titled “setRecord”setRecord(recordItemType?: ItemType | string, startPlaying?: boolean): void;Parameters
recordItemTypeoptionalItemType | stringstartPlayingoptionalboolean
Types
Inherited
Section titled “Inherited”From BlockComponent: block