Grave

The level's graves, where players dig with a shovel in the game's digging minigame, shared by all players. A grave dug by one is open for everyone, including those who join later, and scripts can dig or refill one. Players' games report where graves are, so Grave.all() lists those in the server's level once a player has been near them. Nothing is saved, and all graves are full again after a server start.

grave.all()

Grave.all(near)

All graves that players' games have found in the server's level, nearest to `near` first if given.

grave.get()

Grave.get(id)

The grave with this id, or null.

grave.nearest()

Grave.nearest(at, radius)

The grave nearest a position, within `radius` metres if given, or null.

grave.resetAll()

Grave.resetAll()

Refills all dug graves for all players, and returns how many.

grave.id

id

The grave's id: its location in whole centimetres, as "x,y,z". It stays the same across server starts.

grave.position

position

The grave's location in metres.

grave.dug

dug

Whether the grave is dug out.

grave.distanceTo()

distanceTo(at)

The distance from a position, in metres.

grave.dig()

dig()

Digs the grave out for all players. Returns false if it is already dug. graveDug does not fire, because no player dug it.

grave.reset()

reset()

Refills the grave for all players, so it can be dug again. Returns false if it is full.