[This is preliminary documentation and is subject to change.]
World instance. Manages the player list, manages access/build security, stores metadata.
Namespace: fCraftAssembly: fCraft (in fCraft.dll) Version: 0.6.3.1 (0.6.3.1)
Syntax
| C# |
public sealed class World : IClassy
Members
| All Members | Fields | Properties | Methods |
| Member | Description | |
|---|---|---|
| AcceptPlayer(Player, Boolean) | ||
| AccessSecurity | Controls which players may access this world. | |
| BackupEnabledState | Backup state. Use "Yes" to enable, "No" to disable, and "Auto" to use default settings.
If setting to "Yes", make sure to set BackupInterval property value first. | |
| BackupInterval | Timed backup interval.
If BackupEnabledState is set to "Yes", value must be positive.
If BackupEnabledState is set to "No" or "Auto", this property has no effect. | |
| BackupsEnabled | Whether timed backups are enabled (either manually or by default) on this world. | |
| BlockDB | BlockDB instance used to store/lookup block changes for this world. | |
| BuildSecurity | Controls which players may build in this world. | |
| ChangeMap(Map) | Creates a new World for the given Map, with same properties as this world. | |
| ClassyName | Returns a nicely formatted name, with optional color codes. | |
| CloudColor | Color of the clouds (RGB packed into an int). Set to -1 to use client defaults. | |
| CountPlayers(Boolean) | Counts all players (optionally includes all hidden players). | |
| CountVisiblePlayers(Player) | Counts only the players who are not hidden from a given observer. | |
| DefaultBackupInterval | Default backup interval, for worlds that have BackupEnabledState set to "Auto". | |
| DefaultBackupsEnabled | Whether timed backups are enabled by default for worlds that have BackupEnabledState set to "Auto". | |
| EdgeBlock | The block which will be displayed in the background for the client. | |
| EdgeLevel | Elevation of the "ocean" that surrounds maps. Set to -1 to use client default (halfway up the map). | |
| Equals(Object) | (Inherited from Object.) | |
| Finalize()()()() |
Allows an Object to attempt to free resources and perform other cleanup operations before the Object is reclaimed by garbage collection.
(Inherited from Object.) | |
| FindPlayerExact(String) | Gets player by name (without autocompletion) | |
| FindPlayers(Player, String) | ||
| Flush()()()() | Intiates a map flush, in which all block drawings are completed.
All users are held in limbo until completion, and then resent the map. | |
| FogColor | Color of the fog (RGB packed into an int). Set to -1 to use client defaults. | |
| GenerateWoMConfig(Boolean) | Creates a WOM configuration string. | |
| GetHashCode()()()() |
Serves as a hash function for a particular type.
(Inherited from Object.) | |
| GetNextPatrolTarget(Player) | Selects the next player to teleport to while patroling.
Sets target's LastPatrolTime automatically. | |
| GetNextPatrolTarget(Player, Predicate<(Of <<'(Player>)>>), Boolean) | Selects the next player to teleport to while patroling.
Includes additional inclusion check (predicate). | |
| GetType()()()() |
Gets the Type of the current instance.
(Inherited from Object.) | |
| Greeting | Message shown to players who join this map.
Null if no message is set. | |
| HasChangedSinceBackup | Whether the map was saved since last time it was backed up. | |
| IsFlushing | Whether this world is currently being flushed. | |
| IsFull | Whether the current world is full, determined by ConfigKey.MaxPlayersPerWorld | |
| IsHidden | Whether the world shows up on the /Worlds list.
Can be assigned directly. | |
| IsLoaded | Whether the map is currently loaded. | |
| IsLocked | Whether the world is currently locked (in read-only mode). | |
| IsPendingMapUnload | Whether this world is currently pending unload
(waiting for block updates to finish processing before unloading). | |
| IsValidName(String) | Ensures that player name has the correct length (2-16 characters)
and character set (alphanumeric chars and underscores allowed). | |
| LoadedBy | Name of the player/entity who created this world, null if the player is unknown. | |
| LoadedByClassy | ||
| LoadedOn | Date (UTC) that this world was created on. | |
| LoadMap()()()() | Loads the map file, if needed.
Generates a default map if mapfile is missing or not loadable.
Guaranteed to return a Map object. | |
| Lock(Player) | Locks the current world, which prevents blocks in the world from being updated. | |
| LockedBy | The name of player/entity who last locked this world. | |
| LockedOn | Date (UTC) when this world was last locked. | |
| Map | Map of this world. May be null if world is not loaded. | |
| MapChangedBy | Name of the player/entity who last loaded this map,
Null if the player is unknown or if map has never been changed. | |
| MapChangedByClassy | ||
| MapChangedOn | Date (UTC) of the most recent map change. | |
| MapFileName | Returns the map file name, including MapPath. | |
| MemberwiseClone()()()() |
Creates a shallow copy of the current Object.
(Inherited from Object.) | |
| Name | World name (no formatting).
Use WorldManager.RenameWorld() method to change this. | |
| Players | ||
| Preload | Controls if the map should be loaded before players enter | |
| ReleasePlayer(Player) | ||
| SaveBackup(String) | ||
| SaveMap()()()() | Forces the map to be saved to file. Acquires SyncRoot. | |
| SkyColor | Color of the sky (RGB packed into an int). Set to -1 to use client defaults. | |
| ToString()()()() | (Overrides Object..::..ToString()()()().) | |
| Unlock(Player) | Unlocks the current world, which allows blocks in the world to be changed once more. | |
| UnlockedBy | The name of player/entity who last unlocked this world. | |
| UnlockedOn | Date (UTC) when this world was last locked. | |
| UpdatePlayerList()()()() | Caches the player list to an array (Players -> PlayerList) |