WorldDirectoryResult
The player’s worlds in the game and every verb on them, as
useWorldDirectory returns them.
Properties
Section titled “Properties”| Property | Type | Description |
|---|---|---|
acceptJoinRequest |
(worldId, playerId) => Promise<WorldRequestResult> |
Accepts or declines a request to join, by the player id useWorldJoinRequests names the requester by: the app confirms first. An accepted player is a member; a declined one is not told, and cannot ask again until the requester’s request expires. |
addCoOwner |
(worldId, playerId) => Promise<WorldRequestResult> |
- |
ban |
(worldId, playerId) => Promise<WorldRequestResult> |
- |
browseWorlds |
() => Promise<WorldRequestResult> |
Opens the app’s Browse. |
cancelJoinRequest |
(worldId) => Promise<WorldRequestResult> |
Withdraws the player’s request to join a world. |
create |
(options) => Promise<WorldCreatedResult> |
Makes a world the player owns. A listed one the app confirms first. One with no account opens the app’s sign-in and answers cancelled: the page asks again once the player has an account. |
declineJoinRequest |
(worldId, playerId) => Promise<WorldRequestResult> |
- |
deleteWorld |
(worldId) => Promise<WorldRequestResult> |
Deletes a world, which the app confirms first; it can be brought back for 7 days. |
directory |
WorldDirectory | null |
The player’s worlds; null until the app answers, and where it has none. |
inviteFriends |
(worldId) => Promise<WorldRequestResult> |
Opens the app’s invite by name, which picks among the player’s friends. |
isDevelopment |
boolean |
Whether a stand-in answers outside the player app, as under spawnite dev: one development world the player owns. |
join |
(to, options?) => Promise<WorldRequestResult> |
Takes the player to the world’s room, by its id or its code, or behind a friend who plays the game now, by the friend’s player id as friendsOnline lists it: the app answers done as it takes the player there, and the page leaves for that room’s. A refusal there, as for a full world or a code that changed, shows on the app’s own play screen. |
leave |
(worldId) => Promise<WorldRequestResult> |
Leaves a world the player is a member of: the app confirms first. |
manageWorld |
(worldId) => Promise<WorldRequestResult> |
Opens the world’s own sheet in the app: its codes and invite link, its members, invite by name, settings and delete. |
newCode |
(worldId, kind) => Promise<WorldCodeResult> |
Issues a new invite or visit code, which stops the old one: the app confirms first. |
removeCoOwner |
(worldId, playerId) => Promise<WorldRequestResult> |
- |
removeMember |
(worldId, playerId) => Promise<WorldRequestResult> |
Removes, bans, lifts a ban on, makes a co-owner of, makes a member again or hands the world to the player whose id in the game is playerId, as useWorldMembers names the member: the app confirms first. |
rename |
(worldId, name) => Promise<WorldRequestResult> |
- |
reportWorld |
(worldId) => Promise<WorldRequestResult> |
Opens the app’s report of a world. |
requestToJoin |
(worldId) => Promise<WorldJoinRequestResult> |
Asks the owners of a world that approves who joins to let the requester in, which the app confirms first, since they see the requester’s name. The request stands until they answer it or it expires, 14 days on; an accepted one makes the requester a member, and the world moves to shared. The requester’s game keeps running. |
setApprovalRequired |
(worldId, isApprovalRequired) => Promise<WorldRequestResult> |
Makes a stranger who finds the listed world ask its owners to join rather than walk in, or lets anyone in again, which the app confirms first. It changes nothing for a world Browse does not list, whose codes and friends let people in as before. |
setFavorite |
(worldId, isFavorite) => Promise<WorldRequestResult> |
- |
setListed |
(worldId, isListed) => Promise<WorldRequestResult> |
Lists a world in Browse, which the app confirms first, or unlists it. |
setOpenToFriends |
(worldId, isOpenToFriends) => Promise<WorldRequestResult> |
Lets the friends of its owners and members visit, which the app confirms first, or stops it. |
setRegion |
(worldId, region) => Promise<WorldRequestResult> |
- |
setSettings |
(worldId, settings, browseSettings?) => Promise<WorldRequestResult> |
Changes a world’s settings, which its room reads at its next open. |
shareWorld |
(worldId, options?) => Promise<WorldShareResult> |
Makes the world’s link and shows it in the app’s share sheet, with Copy and the device’s own share, since the game’s frame may do neither: by the world’s id, or with its invite or visit code for its owners, and with a join hint the room reads. Answers the link. |
status |
WorldDirectoryStatus |
- |
transferOwnership |
(worldId, playerId) => Promise<WorldRequestResult> |
- |
unban |
(worldId, playerId) => Promise<WorldRequestResult> |
- |
undeleteWorld |
(worldId) => Promise<WorldRequestResult> |
- |