SerenityJS
    Preparing search index...

    Hierarchy (View Summary)

    Index

    Constructors

    Properties

    abilities: AbilityMap = ...

    The current abilities of the player, and whether they are enabled

    attributes: AttributeMap

    The attributes that are attached to the entity These values are derived from the components and traits of the entity

    blockTarget: null | BlockPosition = null

    The target block that the player is currently breaking.

    clientSystemInfo: ClientSystemInfo

    The player's device information.

    connection: Connection

    The current raknet connection of the player

    dimension: Dimension

    The current dimension of the entity. This should not be dynamically changed, but instead use the teleport method.

    dynamicProperties: Map<string, JSONLikeValue> = ...

    The components that are attached to the entity

    entityTarget: null | Entity = null

    The target entity that the player is currently looking at.

    The flags that are attached to the entity These values are derived from the components and traits of the entity

    identifier: EntityIdentifier

    The identifier of the entity.

    inputInfo: EntityInputInfo = ...

    The input info of the entity

    isAlive: boolean = false

    Whether the entity is alive or not.

    isFalling: boolean = false

    Whether the entity is falling or not.

    isMoving: boolean = false

    Whether the entity is moving or not.

    isTicking: boolean = true

    Whether the entity is currently ticking or not. If true, this means the behaviors of the entity are being processed. If false, this means the entity currently isn't within the simulation distance from a player.

    itemTarget: null | ItemStack = null

    The target item that the player is currently using.

    metadata: MetadataMap

    The metadata that is attached to the entity These values are derived from the components and traits of the entity

    onGround: boolean = false

    Whether the entity is on the ground or not.

    onScreenDisplay: ScreenDisplay = ...

    The screen display for the player. This is used to hide and show elements on the player's screen. This is also used to send title and subtitle messages to the player.

    openedContainer: null | Container = null

    The container that the player is currently viewing.

    pendingForms: Map<number, FormParticipant<never>> = ...

    The pending forms of the player

    permissions: PermissionMember

    The permission level of the player.

    position: Vector3f = ...

    The current position of the entity

    rotation: Rotation = ...

    The current rotation of the entity

    runtimeId: bigint = ++Entity.runtimeId

    The current runtime id of the entity. (Incremented each time an entity is created)

    scoreboardIdentity: ScoreboardIdentity

    The scoreboard identity of the entity.

    serenity: Serenity

    The serenity instance of the server

    sharedProperties: EntitySharedPropertiesMap

    The shared properties that are attached to the entity. These properites are shared to the client to be used in resource pack elements. They can also be queried via the molang engine for use in resource packs.

    skin: SerializedSkin

    The skin of the player

    tags: Set<string> = ...

    The tags that are attached to the entity

    traits: Map<string, PlayerTrait> = ...

    The traits that are attached to the player

    The type of the entity.

    uniqueId: bigint

    The unique id of the entity. (Generated by the server, and exists for the lifetime of the entity)

    username: string

    The username of the player

    uuid: string

    The uuid of the player

    velocity: Vector3f = ...

    The current velocity of the entity

    xuid: string

    The xbox user id of the player

    runtimeId: bigint = 0n

    The running total of entities that have been created

    Accessors

    • get alwaysShowNameTag(): boolean

      Whether the entity name tag is always visible.

      Returns boolean

    • set alwaysShowNameTag(value: boolean): void

      Whether the entity name tag is always visible.

      Parameters

      • value: boolean

      Returns void

    Methods

    • Disconnect the player from the server

      Parameters

      • reason: string

        The reason for the disconnection

      • Optionalcode: DisconnectReason

        The disconnect reason code

      • OptionalhideDisconnectScreen: false

        Whether to hide the disconnect screen

      Returns void

    • Forces the entity to drop an item from its inventory.

      Parameters

      • slot: number

        The slot to drop the item from.

      • amount: number

        The amount of items to drop.

      • container: Container

        The container to drop the item from.

      Returns boolean

      Whether or not the item was dropped.

    • Get the shared property of the entity that is shared with the client.

      Type Parameters

      • T extends string | number | boolean

      Parameters

      • identifier: string

        The identifier of the property.

      Returns null | T

      The value of the property.

    • Checks whether the entity has the effect or not.

      Parameters

      • effectType: EffectType

        The effect type to check if the entity has.

      Returns boolean

      whether the entity has the effect or not.

    • Check if the player has a specific permission.

      Parameters

      • permission: string

        The permission to check.

      Returns boolean

      True if the player has the permission, false otherwise.

    • Remove a permission from the player.

      Parameters

      • permission: string

        The permission to remove.

      Returns void

    • Send packets to the player (Normal Priority)

      Parameters

      • ...packets: DataPacket[]

        The packets to send to the player

      Returns void

    • Send packets to the player (Immediate Priority)

      Parameters

      • ...packets: DataPacket[]

        The packets to send to the player

      Returns void

    • Sets the shared property of the entity that is shared with the client.

      Type Parameters

      • T extends string | number | boolean

      Parameters

      • identifier: string

        The identifier of the property.

      • value: T

        The value of the property.

      Returns void

    • Set the spawn point of the player.

      Parameters

      • position: Vector3f

        The position to set the spawn point to.

      Returns void

    • Shows the player profile of another player.

      Parameters

      • Optionalxuid: string | Player

        The xuid of the player to show the profile of; default is this player.

      Returns void

    • Starts an item cooldown for a specific category.

      Parameters

      • category: string

        The category of the item cooldown.

      • duration: number

        The duration of the cooldown in ticks.

      Returns void

    • Stops a sound that is currently playing.

      Parameters

      • Optionalsound: string

        The name of the sound to stop; default is all sounds.

      Returns void

    • Transfers the player to a different server.

      Parameters

      • address: string

        The address to transfer the player to.

      • port: number

        The port to transfer the player to.

      • reload: boolean = false

        If the world should be reloaded.

      Returns void

    • Creates a new unique id for the entity.

      Parameters

      • network: number

        The network id of the entity type

      • runtimeId: bigint

        The current runtime id of the entity

      Returns bigint

      A generated unique id for the entity