areas.destroy
Removes one of your areas for everyone. Its ID is not used again while the server runs.
Renamed in 0.28 from zones.destroy; see renamed names.
Signature
Section titled “Signature”areas.destroy(id: number): Promise<ActionResult>Parameters
Section titled “Parameters”| Name | Type | Description |
|---|---|---|
id |
number |
The ID from areas.create. |
Returns
Section titled “Returns”A promise of an ActionResult: applied, or rejected with marker-not-found for an
ID that is not one of your areas.
Example
Section titled “Example”import { areas } from "nativemp";
for (const area of areas.listAll()) await areas.destroy(area.id);Related
Section titled “Related”areas.create: make oneareas.update: change itareas.listAll: all of themscriptMarkerDestroyed: it is gone