Skip to content

fires.listAll

Lists the fires burning now that every player sees. Read it when your gamemode loads: the fires already burning do not send sharedFireStarted again.

Renamed in 0.28 from fires.all; see renamed names.

fires.listAll(): readonly SharedFire[]

None.

An array of SharedFire, in no particular order; empty when nothing burns. It is a copy: it does not change as fires start and go out.

gamemodes/my-mode.ts
import { fires, server } from "nativemp";
for (const fire of fires.listAll()) {
server.log(`Fire ${fire.id} in interior ${fire.interior}, strength ${fire.strength}`);
}