ForemanWorlds¶
Read what Foreman keeps in each world: its areas, points and profile. Use them to fill
containers with loot, spawn NPCs at the spawns builds recorded, or turn areas into regions. The service is there when
the Foreman plugin runs with FastAsyncWorldEdit (the world tools); otherwise load returns null.
compileOnly on games.qore:foreman-server-api: Add Foreman to your plugin.
| Method | Returns |
|---|---|
areas(world), area(world, name) |
WorldArea: name, boxes (BoundingBox, max corners exclusive), kind when it reserves space (build, road, yard…), note, theme when it's a zone |
points(world) |
WorldPoint: block position, type and kind (container/chest), the build and room it belongs to |
profile(world) |
The world's profile as JSON ({} without one) |
Reads are thread-safe and return snapshots. Listen to WorldDataChangeEvent (AREAS, POINTS, PROFILE), fired on
the main thread after a change is saved, to follow changes.