earthmc
Version:
An unofficial EarthMC library providing handy methods and extensive info.
53 lines • 1.83 kB
TypeScript
import type { Point2D, SquaremapMap, TownBounds } from "../../types/index.js";
import DataHandler from "../../helpers/DataHandler.js";
import Towns from './Towns.js';
import Nations from './Nations.js';
import Players from "./Players.js";
import Residents from "./Residents.js";
import GPS from "./GPS.js";
export declare class SquaremapURLBuilder {
#private;
constructor(location?: Point2D, zoom?: number);
setX(num: number | string): this;
setZ(num: number | string): this;
setZoom(zoom: number): this;
setWorld(name?: string): this;
get: () => URL;
getAsString: () => string;
}
declare class Squaremap extends DataHandler {
readonly Towns: Towns;
readonly Nations: Nations;
readonly Residents: Residents;
readonly Players: Players;
readonly GPS: GPS;
URLBuilder: typeof SquaremapURLBuilder;
readonly name: SquaremapMap;
readonly inviteRange: number;
constructor(mapName: SquaremapMap, cacheTimeoutMs?: number);
readonly withinTown: (location: Point2D) => Promise<boolean>;
readonly isWilderness: (location: Point2D) => Promise<boolean>;
readonly withinBounds: (location: Point2D, bounds: TownBounds) => boolean;
readonly onlinePlayerData: () => Promise<{
uuid: string;
name: string;
nickname?: string;
world?: string;
x: number | string;
z: number | string;
y?: number | string;
yaw?: number | string;
}[]>;
readonly markerset: () => Promise<{
id: "towny" | "chunky";
name: string;
markers: import("../../main.js").SquaremapArea[];
z_index: number;
order: number;
timestamp: number;
hide: boolean;
control: boolean;
}>;
}
export { Squaremap, Squaremap as default };
//# sourceMappingURL=Squaremap.d.ts.map