Options
All
  • Public
  • Public/Protected
  • All
Menu

Hierarchy

  • EventEmitter
    • Player

Index

Constructors

Properties

animate: any = ...

Animate the avatar

deprecated
askForCrypto: (quantity: string, erc20Address?: string, chain_id?: number) => void = ...

Type declaration

    • (quantity: string, erc20Address?: string, chain_id?: number): void
    • Asks the given player for crypto. Throttled to 1.5s This function is also ONLY available when the player has recently clicked.

      Parameters

      • quantity: string

        the quantity to send, default 0.01

      • Optional erc20Address: string

        Optional, Address of erc20 to send.

      • Optional chain_id: number

        Optional,The network id if any erc20 address is given. (1=mainnet,137= polygon)

        feature.on('click',e=>{
        e.player.askForCrypto("0.05")
        })

      Returns void

collectibles: CollectibleType[]
emote: any = ...
name: undefined | string
parcel: default
position: Vector3
rotation: Vector3
teleportTo: (coords: string) => void = ...

Type declaration

    • (coords: string): void
    • Teleports the avatar to a coordinate

      Parameters

      • coords: string

        string of coordinates, eg: NE@47W,250N

      Returns void

uuid: string
wallet: undefined | string

Accessors

  • get isAnonymous(): boolean
  • get isWithinParcel(): boolean
  • set isWithinParcel(within: boolean): void
  • get token(): string

Methods

  • hasEthereumNFT(contract: string, tokenId: string | number, successCallback?: null | ((bool: boolean) => void), failCallback?: null | ((reason: string) => void)): undefined | false
  • deprecated

    Use hasNFT() in the future.

    Parameters

    • contract: string

      the contract address

    • tokenId: string | number

      the token id

    • successCallback: null | ((bool: boolean) => void) = null

      A callback called on success and has a boolean (whether player has NFT or not) as argument

    • failCallback: null | ((reason: string) => void) = null

      Callback called on fail. With a string as arugment (the reason)

    Returns undefined | false

  • hasNFT(chain: string, contract: string, tokenId: string | number, successCallback?: null | ((bool: boolean) => void), failCallback?: null | ((reason: string) => void)): undefined | false
  • Will Fetch whether the player has the given NFT and return the value using the callbacks provided

    Parameters

    • chain: string

      the chain identifier: 'eth' or 'matic'

    • contract: string

      the contract address

    • tokenId: string | number

      the token id

    • successCallback: null | ((bool: boolean) => void) = null

      A callback called on success and has a boolean (whether player has NFT or not) as argument

    • failCallback: null | ((reason: string) => void) = null

      Callback called on fail. With a string as arugment (the reason)

    Returns undefined | false

  • hasWearable(tokenId: number, collectionId?: number): boolean
  • Parameters

    • tokenId: number
    • collectionId: number = 1

    Returns boolean

  • isLoggedIn(): boolean
  • kick(reason?: undefined | string): void
  • Parameters

    • reason: undefined | string = undefined

    Returns void

Generated using TypeDoc