[This is preliminary documentation and is subject to change.]

The Server type exposes the following methods.

Methods

 Public

 Protected
 Instance

 Static
 Declared

 Inherited
 XNA Framework Only

 .NET Compact Framework Only

 MemberDescription
BackupData()()()()
BindIPEndPointCallback(ServicePoint, IPEndPoint, Int32)
CalculateMaxPacketsPerUpdate(World)
CancelShutdown()()()()
Attempts to cancel the shutdown timer.
CountPlayers(Boolean)
Counts online players, optionally including hidden ones.
CountVisiblePlayers(Player)
Counts online players whom the given observer can see.
FindPlayerExact(Player, String, Boolean)
FindPlayerOrPrintMatches(Player, String, Boolean, Boolean)
Find player by name using autocompletion. Returns null and prints message if none or multiple players matched. Raises Player.SearchingForPlayer event, which may modify search results.
FindPlayers(String, Boolean)
Finds a player by name, using autocompletion. Returns ALL matching players, including hidden ones.
FindPlayers(Player, String, Boolean)
Finds a player by name, using autocompletion. Does not include hidden players.
GetArg(ArgKey)
Returns value of a given command-line argument (if present). Use HasArg to check flag arguments.
GetArgList()()()()
Produces a list of arguments that were passed to this instance of fCraft.
GetArgString()()()()
Produces a string containing all recognized arguments that wereset/passed to this instance of fCraft.
GetRandomString(Int32)
HasArg(ArgKey)
Checks whether a command-line argument was set.
InitLibrary(IEnumerable<(Of <<'(String>)>>))
Reads command-line switches and sets up paths and logging. This should be called before any other library function. Note to frontend devs: Subscribe to log-related events before calling this. Does not raise any events besides Logger.Logged. Throws exceptions on failure.
InitServer()()()()
Initialized various server subsystems. This should be called after InitLibrary and before StartServer. Loads config, PlayerDB, IP bans, AutoRank settings, builds a list of commands, and prepares the IRC bot. Raises Server.Initializing and Server.Initialized events, and possibly Logger.Logged events. Throws exceptions on failure.
MakePlayerConnectedMessage(Player, Boolean, World)
Message(String)
Broadcasts a message to all online players. Shorthand for Server.Players.Message
Message(String, array<Object>[]()[][])
Broadcasts a message to all online players. Shorthand for Server.Players.Message
Message(Player, String)
Broadcasts a message to all online players except one. Shorthand for Server.Players.Except(except).Message
Message(Player, String, array<Object>[]()[][])
Broadcasts a message to all online players except one. Shorthand for Server.Players.Except(except).Message
ReplaceTextKeywords(Player, String)
RequestGC()()()()
Shutdown(ShutdownParams, Boolean)
Initiates the server shutdown with given parameters.
StartServer()()()()
Starts the server: Creates Console pseudoplayer, loads the world list, starts listening for incoming connections, sets up scheduled tasks and starts the scheduler, starts the heartbeat, and connects to IRC. Raises Server.Starting and Server.Started events. May throw an exception on hard failure.
UnregisterPlayer(Player)
VerifyName(String, String, String)

See Also