The EntityLeashableComponent class in @minecraft/server.
Class in @minecraft/server
Extends EntityComponent
import { EntityLeashableComponent } from '@minecraft/server';Constructor
Section titled “Constructor”protected constructor();Properties
Section titled “Properties”canBeStolen
Section titled “canBeStolen”read-only
readonly canBeStolen: boolean;hardDistance
Section titled “hardDistance”read-only
readonly hardDistance: number;isLeashed
Section titled “isLeashed”read-only
readonly isLeashed: boolean;leashHolder
Section titled “leashHolder”read-only optional
readonly leashHolder?: Entity;Types
leashHolderEntityId
Section titled “leashHolderEntityId”read-only optional
readonly leashHolderEntityId?: string;maxDistance
Section titled “maxDistance”read-only
readonly maxDistance: number;softDistance
Section titled “softDistance”read-only
readonly softDistance: number;componentId
Section titled “componentId”static read-only
static readonly componentId = 'minecraft:leashable';Methods
Section titled “Methods”leashTo
Section titled “leashTo”leashTo(leashHolder: Entity): void;Parameters
leashHolderEntity
Types
unleash
Section titled “unleash”unleash(): void;