Hierarchy (view full)

Constructors

Properties

emit: any
Routes: {
    AVOID_PUBLIC: {
        avoidPublic: boolean;
        avoidPvp: boolean;
    };
    AVOID_PVP: {
        avoidPublic: boolean;
        avoidPvp: boolean;
    };
    FASTEST: {
        avoidPublic: boolean;
        avoidPvp: boolean;
    };
    SAFEST: {
        avoidPublic: boolean;
        avoidPvp: boolean;
    };
} = Routes

Accessors

  • get lastLoc(): {
        x: number;
        z: number;
    }
  • Returns {
        x: number;
        z: number;
    }

    • x: number
    • z: number
  • set lastLoc(val): void
  • Parameters

    • val: {
          x: number;
          z: number;
      }
      • x: number
      • z: number

    Returns void

Methods

  • Parameters

    • player: {
          name: string;
          nation?: string;
          nickname?: string;
          online: boolean;
          rank: string;
          town: string;
          underground?: boolean;
          world?: string;
          x?: string | number;
          yaw?: string | number;
          z?: string | number;
      }
      • name: string
      • Optionalnation?: string
      • Optionalnickname?: string
      • online: boolean
      • rank: string
      • town: string
      • Optionalunderground?: boolean
      • Optionalworld?: string
      • Optionalx?: string | number
      • Optionalyaw?: string | number
      • Optionalz?: string | number

    Returns boolean

  • Parameters

    • playerName: string
    • interval: number = 3000
    • route: {
          avoidPublic: boolean;
          avoidPvp: boolean;
      } = Routes.FASTEST
      • avoidPublic: boolean
      • avoidPvp: boolean

    Returns Promise<GPS>

  • Determines the direction to the destination from the origin.

    Only one of the main four directions (N, S, W, E) can be returned, no intermediates.

    Parameters

    • origin: Point2D

      The location where something is currently at.

    • destination: Point2D

      The location we wish to arrive at.

    Returns
        | "north"
        | "east"
        | "south"
        | "west"