Manages the world list. Handles loading/unloading, renaming, map changes, and more.
More...
|
| static World | FindMainWorld (Player player) |
| |
| static void | SaveWorldList () |
| | Saves the current world list to worlds.xml. Thread-safe.
|
| |
| static World | FindWorldExact ([NotNull] string name) |
| | Finds a world by full name. Target world is not guaranteed to have a loaded map.
|
| |
| static World[] | FindWorldsNoEvent ([NotNull] string name) |
| | Finds all worlds that match the given world name. Autocompletes. Does not raise SearchingForWorld event. Target worlds are not guaranteed to have a loaded map.
|
| |
| static World[] | FindWorlds ([CanBeNull] Player player,[NotNull] string name) |
| | Finds all worlds that match the given name. Autocompletes. Raises SearchingForWorld event. Target worlds are not guaranteed to have a loaded map.
|
| |
| static World | FindWorldOrPrintMatches ([NotNull] Player player,[NotNull] string worldName) |
| | Tries to find a single world by full or partial name. Returns null if zero or multiple worlds matched.
|
| |
| static World | AddWorld ([CanBeNull] Player player,[NotNull] string name,[CanBeNull] Map map, bool preload) |
| | Creates a new world and adds it to the current list of worlds being managed by WorldManager.
|
| |
| static void | RenameWorld ([NotNull] World world,[NotNull] string newName, bool moveMapFile, bool overwrite) |
| | Changes the name of the given world.
|
| |
| static void | RemoveWorld ([NotNull] World worldToDelete) |
| | Removes the specified world from the list of worlds being managed by WorldManager.
|
| |
| static int | CountLoadedWorlds () |
| | Number of all worlds that are currently loaded.
|
| |
| static int | CountLoadedWorlds ([NotNull] Player observer) |
| | Number of worlds that are currently loaded and can be seen by the specified observer.
|
| |
| static IEnumerable< World > | ListLoadedWorlds () |
| | List of all the worlds that are currently loaded.
|
| |
| static IEnumerable< World > | ListLoadedWorlds ([NotNull] Player observer) |
| | List of worlds that are currently loaded and can be seen by the specified observer.
|
| |
| static string | FindMapFile ([NotNull] Player player,[NotNull] string fileName) |
| | Searches for a map using the specified fileName. Prints any errors/warnings directly to the player.
|
| |
|
| static World[] | Worlds [get, set] |
| | List of worlds currently being managed by WorldManager.
|
| |
| static World | MainWorld [get, set] |
| | Gets or sets the default main world. That's the world that players first join upon connecting. The map of the new main world is preloaded, and old one is unloaded, if needed.
|
| |
Manages the world list. Handles loading/unloading, renaming, map changes, and more.
| static World fCraft.WorldManager.AddWorld |
( |
[CanBeNull] Player |
player, |
|
|
[NotNull] string |
name, |
|
|
[CanBeNull] Map |
map, |
|
|
bool |
preload |
|
) |
| |
|
static |
Creates a new world and adds it to the current list of worlds being managed by WorldManager.
- Parameters
-
| player | Player who is adding the world. May be null. |
| name | Name of the world being added. May NOT be null. |
| map | Map to assign to the newly created world. May be null. |
| preload | Whether or not the map should be preloaded. |
- Returns
- Newly-created world.
- Exceptions
-
| ArgumentNullException | name is null. |
| WorldOpException | Given world name is invalid; a world with this name already exists; or an event callback cancels the addition. |
| static int fCraft.WorldManager.CountLoadedWorlds |
( |
| ) |
|
|
static |
Number of all worlds that are currently loaded.
- Returns
- Number of all loaded worlds.
| static int fCraft.WorldManager.CountLoadedWorlds |
( |
[NotNull] Player |
observer | ) |
|
|
static |
Number of worlds that are currently loaded and can be seen by the specified observer.
- Parameters
-
- Returns
- Number of worlds the specified player has permission to observe.
| static World fCraft.WorldManager.FindMainWorld |
( |
Player |
player | ) |
|
|
static |
| static string fCraft.WorldManager.FindMapFile |
( |
[NotNull] Player |
player, |
|
|
[NotNull] string |
fileName |
|
) |
| |
|
static |
Searches for a map using the specified fileName. Prints any errors/warnings directly to the player.
- Parameters
-
| player | Player who is doing the search. |
| fileName | FileName of the map to be searched for. |
- Returns
- Full source file name. Null if file could not be found, or an error occurred.
- Exceptions
-
| ArgumentNullException | player or fileName is null. |
| static World fCraft.WorldManager.FindWorldExact |
( |
[NotNull] string |
name | ) |
|
|
static |
Finds a world by full name. Target world is not guaranteed to have a loaded map.
- Returns
- World if found, or null if not found.
| static World fCraft.WorldManager.FindWorldOrPrintMatches |
( |
[NotNull] Player |
player, |
|
|
[NotNull] string |
worldName |
|
) |
| |
|
static |
Tries to find a single world by full or partial name. Returns null if zero or multiple worlds matched.
- Parameters
-
| player | Player who will receive messages regarding zero or multiple matches. |
| worldName | Full or partial world name. |
| static World [] fCraft.WorldManager.FindWorlds |
( |
[CanBeNull] Player |
player, |
|
|
[NotNull] string |
name |
|
) |
| |
|
static |
Finds all worlds that match the given name. Autocompletes. Raises SearchingForWorld event. Target worlds are not guaranteed to have a loaded map.
- Parameters
-
| player | Player who is calling the query. May be null. |
| name | Full or partial world name. |
- Returns
- An array of 0 or more worlds that matched the name.
| static World [] fCraft.WorldManager.FindWorldsNoEvent |
( |
[NotNull] string |
name | ) |
|
|
static |
Finds all worlds that match the given world name. Autocompletes. Does not raise SearchingForWorld event. Target worlds are not guaranteed to have a loaded map.
| static IEnumerable<World> fCraft.WorldManager.ListLoadedWorlds |
( |
| ) |
|
|
static |
List of all the worlds that are currently loaded.
- Returns
- List of all loaded worlds.
| static IEnumerable<World> fCraft.WorldManager.ListLoadedWorlds |
( |
[NotNull] Player |
observer | ) |
|
|
static |
List of worlds that are currently loaded and can be seen by the specified observer.
- Parameters
-
- Returns
- List of worlds the specified player has permission to observe.
| static void fCraft.WorldManager.RemoveWorld |
( |
[NotNull] World |
worldToDelete | ) |
|
|
static |
Removes the specified world from the list of worlds being managed by WorldManager.
- Parameters
-
| worldToDelete | World to be deleted. |
| static void fCraft.WorldManager.RenameWorld |
( |
[NotNull] World |
world, |
|
|
[NotNull] string |
newName, |
|
|
bool |
moveMapFile, |
|
|
bool |
overwrite |
|
) |
| |
|
static |
Changes the name of the given world.
| static void fCraft.WorldManager.SaveWorldList |
( |
| ) |
|
|
static |
Saves the current world list to worlds.xml. Thread-safe.
| const string fCraft.WorldManager.BuildSecurityXmlTagName = "BuildSecurity" |
| World fCraft.WorldManager.MainWorld |
|
staticgetset |
Gets or sets the default main world. That's the world that players first join upon connecting. The map of the new main world is preloaded, and old one is unloaded, if needed.
- Exceptions
-
| System.ArgumentNullException | - Exceptions
-
|
| World [] fCraft.WorldManager.Worlds |
|
staticgetset |
Occurs after the main world has been changed.
Occurs when the main world is being changed (cancelable).
Occurs when a player is searching for worlds (with autocompletion). The list of worlds in the search results may be replaced.
Occurs after a new world is created/added.
Occurs before a new world is created/added (cancelable).
The documentation for this class was generated from the following file: