UNPKG

earthmc

Version:

An unofficial EarthMC library providing handy methods and extensive info.

115 lines 3.91 kB
import type { Nation, StrictPoint2D, Town } from '../../types/index.js'; import type { Dynmap } from "./Dynmap.js"; import type { EntityApi } from '../../helpers/EntityApi.js'; import { NotFoundError } from "../../utils/errors.js"; declare class Nations implements EntityApi<Nation | NotFoundError> { #private; get map(): Dynmap; constructor(map: Dynmap); readonly get: (...nationList: string[]) => Promise<{ name: string; king: string; towns: string[]; residents: string[]; area: number; capital: import("../../types/nation.js").NationCapital; uuid?: string; wiki?: string; status?: import("../../types/oapi.js").RawEntityStatus; stats?: import("../../types/oapi.js").RawEntityStats & { numTowns?: number; }; spawn?: import("../../types/oapi.js").RawEntitySpawn; ranks?: { [key: string]: string[]; }; allies?: string[]; enemies?: string[]; mapColorHexCode?: string; } | NotFoundError | ({ name: string; king: string; towns: string[]; residents: string[]; area: number; capital: import("../../types/nation.js").NationCapital; uuid?: string; wiki?: string; status?: import("../../types/oapi.js").RawEntityStatus; stats?: import("../../types/oapi.js").RawEntityStats & { numTowns?: number; }; spawn?: import("../../types/oapi.js").RawEntitySpawn; ranks?: { [key: string]: string[]; }; allies?: string[]; enemies?: string[]; mapColorHexCode?: string; } | NotFoundError)[]>; readonly all: (towns?: Town[]) => Promise<{ name: string; king: string; towns: string[]; residents: string[]; area: number; capital: import("../../types/nation.js").NationCapital; uuid?: string; wiki?: string; status?: import("../../types/oapi.js").RawEntityStatus; stats?: import("../../types/oapi.js").RawEntityStats & { numTowns?: number; }; spawn?: import("../../types/oapi.js").RawEntitySpawn; ranks?: { [key: string]: string[]; }; allies?: string[]; enemies?: string[]; mapColorHexCode?: string; }[]>; readonly nearby: (location: StrictPoint2D, radius: StrictPoint2D, nations?: Nation[]) => Promise<{ name: string; king: string; towns: string[]; residents: string[]; area: number; capital: import("../../types/nation.js").NationCapital; uuid?: string; wiki?: string; status?: import("../../types/oapi.js").RawEntityStatus; stats?: import("../../types/oapi.js").RawEntityStats & { numTowns?: number; }; spawn?: import("../../types/oapi.js").RawEntitySpawn; ranks?: { [key: string]: string[]; }; allies?: string[]; enemies?: string[]; mapColorHexCode?: string; }[]>; readonly joinable: (townName: string, nationless?: boolean) => Promise<{ name: string; king: string; towns: string[]; residents: string[]; area: number; capital: import("../../types/nation.js").NationCapital; uuid?: string; wiki?: string; status?: import("../../types/oapi.js").RawEntityStatus; stats?: import("../../types/oapi.js").RawEntityStats & { numTowns?: number; }; spawn?: import("../../types/oapi.js").RawEntitySpawn; ranks?: { [key: string]: string[]; }; allies?: string[]; enemies?: string[]; mapColorHexCode?: string; }[]>; } export { Nations, Nations as default }; //# sourceMappingURL=Nations.d.ts.map