C# Class fCraft.WorldManager

Manages the world list. Handles loading/unloading, renaming, map changes, and more.
Afficher le fichier Open project: GlennMR/800craft Class Usage Examples

Private Properties

Свойство Type Description
CheckMapFile void
FindMapFile string
FindWorldExact World
FindWorldOrPrintMatches World
LoadWorldList bool
LoadWorldListEntry void
RaiseMainWorldChangedEvent void
RaiseMainWorldChangingEvent bool
RaiseWorldCreatedEvent void
RaiseWorldCreatingEvent bool
ReplaceWorld void

Méthodes publiques

Méthode Description
AddWorld ( [ player, [ name, [ map, bool neverUnload ) : World
CountLoadedWorlds ( ) : int
CountLoadedWorlds ( [ observer ) : int
FindWorlds ( [ player, [ name ) : fCraft.World[]

Finds all worlds that match the given name. Autocompletes. Raises SearchingForWorld event. Target worlds are not guaranteed to have a loaded map.

FindWorldsNoEvent ( [ name ) : fCraft.World[]

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.

ListLoadedWorlds ( ) : IEnumerable
ListLoadedWorlds ( [ observer ) : IEnumerable
RemoveWorld ( [ worldToDelete ) : void
RenameWorld ( [ world, [ newName, bool moveMapFile, bool overwrite ) : void

Changes the name of the given world.

SaveWorldList ( ) : void

Saves the current world list to worlds.xml. Thread-safe.

UpdateWorldList ( ) : void

Private Methods

Méthode Description
CheckMapFile ( [ world ) : void
FindMapFile ( [ player, [ fileName ) : string
FindWorldExact ( [ name ) : World
FindWorldOrPrintMatches ( [ player, [ worldName ) : World
LoadWorldList ( ) : bool
LoadWorldListEntry ( [ el ) : void
RaiseMainWorldChangedEvent ( [ oldWorld, [ newWorld ) : void
RaiseMainWorldChangingEvent ( World oldWorld, [ newWorld ) : bool
RaiseWorldCreatedEvent ( [ player, [ world ) : void
RaiseWorldCreatingEvent ( [ player, [ worldName, [ map ) : bool
ReplaceWorld ( [ oldWorld, [ newWorld ) : void

Method Details

AddWorld() public static méthode

public static AddWorld ( [ player, [ name, [ map, bool neverUnload ) : World
player [
name [
map [
neverUnload bool
Résultat World

CountLoadedWorlds() public static méthode

public static CountLoadedWorlds ( ) : int
Résultat int

CountLoadedWorlds() public static méthode

public static CountLoadedWorlds ( [ observer ) : int
observer [
Résultat int

FindWorlds() public static méthode

Finds all worlds that match the given name. Autocompletes. Raises SearchingForWorld event. Target worlds are not guaranteed to have a loaded map.
public static FindWorlds ( [ player, [ name ) : fCraft.World[]
player [ Player who is calling the query. May be null.
name [ Full or partial world name.
Résultat fCraft.World[]

FindWorldsNoEvent() public static méthode

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.
public static FindWorldsNoEvent ( [ name ) : fCraft.World[]
name [
Résultat fCraft.World[]

ListLoadedWorlds() public static méthode

public static ListLoadedWorlds ( ) : IEnumerable
Résultat IEnumerable

ListLoadedWorlds() public static méthode

public static ListLoadedWorlds ( [ observer ) : IEnumerable
observer [
Résultat IEnumerable

RemoveWorld() public static méthode

public static RemoveWorld ( [ worldToDelete ) : void
worldToDelete [
Résultat void

RenameWorld() public static méthode

Changes the name of the given world.
public static RenameWorld ( [ world, [ newName, bool moveMapFile, bool overwrite ) : void
world [
newName [
moveMapFile bool
overwrite bool
Résultat void

SaveWorldList() public static méthode

Saves the current world list to worlds.xml. Thread-safe.
public static SaveWorldList ( ) : void
Résultat void

UpdateWorldList() public static méthode

public static UpdateWorldList ( ) : void
Résultat void