C# Класс fCraft.WorldManager

Manages the world list. Handles loading/unloading, renaming, map changes, and more.
Показать файл Открыть проект Примеры использования класса

Private Properties

Свойство Тип Описание
CheckMapFile void
FindMapFile string
FindWorldExact World
FindWorldOrPrintMatches World
LoadWorldList bool
LoadWorldListEntry void
RaiseMainWorldChangedEvent void
RaiseMainWorldChangingEvent bool
RaiseWorldCreatedEvent void
RaiseWorldCreatingEvent bool
ReplaceWorld void

Открытые методы

Метод Описание
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

Приватные методы

Метод Описание
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

Описание методов

AddWorld() публичный статический Метод

public static AddWorld ( [ player, [ name, [ map, bool neverUnload ) : World
player [
name [
map [
neverUnload bool
Результат World

CountLoadedWorlds() публичный статический Метод

public static CountLoadedWorlds ( ) : int
Результат int

CountLoadedWorlds() публичный статический Метод

public static CountLoadedWorlds ( [ observer ) : int
observer [
Результат int

FindWorlds() публичный статический Метод

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.
Результат fCraft.World[]

FindWorldsNoEvent() публичный статический Метод

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 [
Результат fCraft.World[]

ListLoadedWorlds() публичный статический Метод

public static ListLoadedWorlds ( ) : IEnumerable
Результат IEnumerable

ListLoadedWorlds() публичный статический Метод

public static ListLoadedWorlds ( [ observer ) : IEnumerable
observer [
Результат IEnumerable

RemoveWorld() публичный статический Метод

public static RemoveWorld ( [ worldToDelete ) : void
worldToDelete [
Результат void

RenameWorld() публичный статический Метод

Changes the name of the given world.
public static RenameWorld ( [ world, [ newName, bool moveMapFile, bool overwrite ) : void
world [
newName [
moveMapFile bool
overwrite bool
Результат void

SaveWorldList() публичный статический Метод

Saves the current world list to worlds.xml. Thread-safe.
public static SaveWorldList ( ) : void
Результат void

UpdateWorldList() публичный статический Метод

public static UpdateWorldList ( ) : void
Результат void