![]() |
fCraft
0.636
Custom Minecraft Server
|
World instance. Manages the player list, manages access/build security, stores metadata. More...


Public Member Functions | |
| Map | LoadMap () |
| Loads the map file, if needed. Generates a default map if mapfile is missing or not loadable. Guaranteed to return a Map object. | |
| void | SaveMap () |
| Forces the map to be saved to file. Acquires SyncRoot. | |
| World | ChangeMap ([NotNull] Map newMap) |
| Creates a new World for the given Map, with same properties as this world. | |
| void | 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. | |
| Map | AcceptPlayer ([NotNull] Player player, bool announce) |
| bool | ReleasePlayer ([NotNull] Player player) |
| Player[] | FindPlayers ([NotNull] Player player,[NotNull] string playerName) |
| Player | FindPlayerExact ([NotNull] string playerName) |
| Gets player by name (without autocompletion) | |
| int | CountPlayers (bool includeHiddenPlayers) |
| Counts all players (optionally includes all hidden players). | |
| int | CountVisiblePlayers ([NotNull] Player observer) |
| Counts only the players who are not hidden from a given observer. | |
| bool | Lock ([NotNull] Player player) |
| Locks the current world, which prevents blocks in the world from being updated. | |
| bool | Unlock ([NotNull] Player player) |
| Unlocks the current world, which allows blocks in the world to be changed once more. | |
| Player | GetNextPatrolTarget ([NotNull] Player observer) |
| Selects the next player to teleport to while patroling. Sets target's LastPatrolTime automatically. | |
| Player | GetNextPatrolTarget ([NotNull] Player observer,[NotNull] Predicate< Player > predicate, bool setLastPatrolTime) |
| Selects the next player to teleport to while patroling. Includes additional inclusion check (predicate). | |
| bool | SaveBackup ([NotNull] string targetName) |
| Makes a copy of the current map file associated with this world. This does NOT save map to disk, and does NOT guarantee that the most up-to-date copy of the map was backed up. | |
| string | GenerateWoMConfig (bool sendMotd) |
| Creates a WOM configuration string. | |
| override string | ToString () |
Static Public Member Functions | |
| static bool | IsValidName ([NotNull] string name) |
| Ensures that player name has the correct length (2-16 characters) and character set (alphanumeric chars and underscores allowed). | |
Public Attributes | |
| int | CloudColor = -1 |
| Color of the clouds (RGB packed into an int). Set to -1 to use client defaults. | |
| int | FogColor = -1 |
| Color of the fog (RGB packed into an int). Set to -1 to use client defaults. | |
| int | SkyColor = -1 |
| Color of the sky (RGB packed into an int). Set to -1 to use client defaults. | |
| int | EdgeLevel = -1 |
| Elevation of the "ocean" that surrounds maps. Set to -1 to use client default (halfway up the map). | |
| Block | EdgeBlock = Block.Water |
| The block which will be displayed in the background for the client. | |
Properties | |
| string | Name [get, set] |
| World name (no formatting). Use WorldManager.RenameWorld() method to change this. | |
| bool | IsHidden [get, set] |
| Whether the world shows up on the /Worlds list. Can be assigned directly. | |
| bool | IsPendingMapUnload [get, set] |
| Whether this world is currently pending unload (waiting for block updates to finish processing before unloading). | |
| SecurityController | AccessSecurity [get, set] |
| Controls which players may access this world. | |
| SecurityController | BuildSecurity [get, set] |
| Controls which players may build in this world. | |
| DateTime | LoadedOn [get, set] |
| Date (UTC) that this world was created on. | |
| string | LoadedBy [get, set] |
| Name of the player/entity who created this world, null if the player is unknown. | |
| string | LoadedByClassy [get] |
| DateTime | MapChangedOn [get, set] |
| Date (UTC) of the most recent map change. | |
| string | MapChangedBy [get, set] |
| Name of the player/entity who last loaded this map, Null if the player is unknown or if map has never been changed. | |
| string | MapChangedByClassy [get] |
| string | Greeting [get, set] |
| Message shown to players who join this map. Null if no message is set. | |
| BlockDB | BlockDB [get, set] |
| BlockDB instance used to store/lookup block changes for this world. | |
| Map | Map [get, set] |
| Map of this world. May be null if world is not loaded. | |
| bool | IsLoaded [get] |
| Whether the map is currently loaded. | |
| string | MapFileName [get] |
| Returns the map file name, including MapPath. | |
| bool | Preload [get, set] |
| Controls if the map should be loaded before players enter. Map is immediately loaded when Preload is set to true. Map is unloaded if Preloaded is set to false, and there are no players on this world. | |
| bool | IsFlushing [get, set] |
| Whether this world is currently being flushed. | |
| Player[] | Players [get, set] |
| bool | IsFull [get] |
| Whether the current world is full, determined by ConfigKey.MaxPlayersPerWorld | |
| bool | IsLocked [get, set] |
| Whether the world is currently locked (in read-only mode). | |
| string | LockedBy [get, set] |
| The name of player/entity who last locked this world. | |
| string | UnlockedBy [get, set] |
| The name of player/entity who last unlocked this world. | |
| DateTime | LockedOn [get, set] |
| Date (UTC) when this world was last locked. | |
| DateTime | UnlockedOn [get, set] |
| Date (UTC) when this world was last locked. | |
| bool | BackupsEnabled [get] |
| Whether timed backups are enabled (either manually or by default) on this world. | |
| bool | HasChangedSinceBackup [get, set] |
| Whether the map was saved since last time it was backed up. | |
| YesNoAuto | BackupEnabledState [get, set] |
| 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. | |
| TimeSpan | BackupInterval [get, set] |
| 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. | |
| static TimeSpan | DefaultBackupInterval [get, set] |
| Default backup interval, for worlds that have BackupEnabledState set to "Auto". | |
| static bool | DefaultBackupsEnabled [get] |
| Whether timed backups are enabled by default for worlds that have BackupEnabledState set to "Auto". | |
| string | ClassyName [get] |
| Returns a nicely formatted name, with optional color codes. | |
Properties inherited from fCraft.IClassy | |
| string | ClassyName [get] |
| Name optionally formatted with minecraft color codes or other decorations. | |
World instance. Manages the player list, manages access/build security, stores metadata.
| int fCraft.World.CountPlayers | ( | bool | includeHiddenPlayers | ) |
Counts all players (optionally includes all hidden players).
| int fCraft.World.CountVisiblePlayers | ( | [NotNull] Player | observer | ) |
Counts only the players who are not hidden from a given observer.
| Player fCraft.World.FindPlayerExact | ( | [NotNull] string | playerName | ) |
Gets player by name (without autocompletion)
| void fCraft.World.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.
| string fCraft.World.GenerateWoMConfig | ( | bool | sendMotd | ) |
Creates a WOM configuration string.
| sendMotd | Determines if the motd is sent with the configuration string. |
| Player fCraft.World.GetNextPatrolTarget | ( | [NotNull] Player | observer, |
| [NotNull] Predicate< Player > | predicate, | ||
| bool | setLastPatrolTime | ||
| ) |
Selects the next player to teleport to while patroling. Includes additional inclusion check (predicate).
| observer | Player who is patrolling. |
| predicate | Additional inclusion check for patrol targets. Applied after the standard checks. Allows filtering out unwanted players. |
| setLastPatrolTime | Whether to set target's LastPatrolTime. |
| ArgumentNullException | observer or predicate is null. |
|
static |
Ensures that player name has the correct length (2-16 characters) and character set (alphanumeric chars and underscores allowed).
| Map fCraft.World.LoadMap | ( | ) |
Loads the map file, if needed. Generates a default map if mapfile is missing or not loadable. Guaranteed to return a Map object.
| bool fCraft.World.Lock | ( | [NotNull] Player | player | ) |
Locks the current world, which prevents blocks in the world from being updated.
| player | Player who is issueing the lock. |
| bool fCraft.World.ReleasePlayer | ( | [NotNull] Player | player | ) |
| bool fCraft.World.SaveBackup | ( | [NotNull] string | targetName | ) |
Makes a copy of the current map file associated with this world. This does NOT save map to disk, and does NOT guarantee that the most up-to-date copy of the map was backed up.
| targetName | Target file name. |
| ArgumentNullException | targetName is null. |
| void fCraft.World.SaveMap | ( | ) |
Forces the map to be saved to file. Acquires SyncRoot.
| override string fCraft.World.ToString | ( | ) |
| bool fCraft.World.Unlock | ( | [NotNull] Player | player | ) |
Unlocks the current world, which allows blocks in the world to be changed once more.
| player | Player who is issueing the unlock. |
| int fCraft.World.CloudColor = -1 |
Color of the clouds (RGB packed into an int). Set to -1 to use client defaults.
| Block fCraft.World.EdgeBlock = Block.Water |
The block which will be displayed in the background for the client.
| int fCraft.World.EdgeLevel = -1 |
Elevation of the "ocean" that surrounds maps. Set to -1 to use client default (halfway up the map).
| int fCraft.World.FogColor = -1 |
Color of the fog (RGB packed into an int). Set to -1 to use client defaults.
| int fCraft.World.SkyColor = -1 |
Color of the sky (RGB packed into an int). Set to -1 to use client defaults.
|
getset |
Controls which players may access this world.
|
getset |
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.
|
getset |
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.
|
get |
Whether timed backups are enabled (either manually or by default) on this world.
|
getset |
BlockDB instance used to store/lookup block changes for this world.
|
getset |
Controls which players may build in this world.
|
get |
Returns a nicely formatted name, with optional color codes.
|
staticgetset |
Default backup interval, for worlds that have BackupEnabledState set to "Auto".
|
staticget |
Whether timed backups are enabled by default for worlds that have BackupEnabledState set to "Auto".
|
getset |
Message shown to players who join this map. Null if no message is set.
|
getset |
Whether the map was saved since last time it was backed up.
|
getset |
Whether this world is currently being flushed.
|
get |
Whether the current world is full, determined by ConfigKey.MaxPlayersPerWorld
|
getset |
Whether the world shows up on the /Worlds list. Can be assigned directly.
|
get |
Whether the map is currently loaded.
|
getset |
Whether the world is currently locked (in read-only mode).
|
getset |
Whether this world is currently pending unload (waiting for block updates to finish processing before unloading).
|
getset |
Name of the player/entity who created this world, null if the player is unknown.
|
get |
|
getset |
Date (UTC) that this world was created on.
|
getset |
The name of player/entity who last locked this world.
|
getset |
Date (UTC) when this world was last locked.
|
getset |
Name of the player/entity who last loaded this map, Null if the player is unknown or if map has never been changed.
|
get |
|
getset |
Date (UTC) of the most recent map change.
|
get |
Returns the map file name, including MapPath.
|
getset |
World name (no formatting). Use WorldManager.RenameWorld() method to change this.
|
getset |
|
getset |
|
getset |
The name of player/entity who last unlocked this world.
|
getset |
Date (UTC) when this world was last locked.
1.8.2