Architecture

From fCraft Wiki

Jump to: navigation, search

fCraft setup consists of two shared modules (fCraft.dll and fCraftGUI.dll), a visual configuration tool (ConfigGUI.exe), and a choice of front-ends (ServerGUI.exe and ServerCLI.exe).

[edit] Project Directory Structure

[edit] Key Classes

fCraft/Commands/Command.cs
A text scanner that aids parsing chat commands and their arguments.
fCraft/Commands/CommandDescriptor.cs'
Describes a chat command. Defines properties, permission requirements, and usage information. Specifies a handler method. Used to add regular commands.
fCraft/Drawing/DrawOperation.cs
Abstract class representing a drawing operation. Used to add draw commands.
fCraft/Player/Chat.cs
Helper class for handling and broadcasting player-generated chat.
fCraft/Player/Permission.cs
Enumeration of all permission types/categories. Every rank definition contains a combination of these.
fCraft/Network/Player.Networking.cs, fCraft/Player/Player.cs, fCraft/Player/Player.Events.cs
Object representing volatile state ("session") of a connected player. For persistent state of a known player account, see PlayerInfo. Use "Info" property of the Player class to access the associated PlayerInfo record.
fCraft/Player/PlayerDB.cs
Persistent database of player information. Can be used to look up online or offline players and to gather statistics.
fCraft/Player/PlayerInfo.Actions.cs, fCraft/Player/PlayerInfo.cs, fCraft/Player/PlayerInfo.Events.cs
Object representing persistent state ("record") of a player, online or offline. There is exactly one PlayerInfo object for each known Minecraft account. All data is stored in the PlayerDB.
fCraft/Player/Rank.cs
A rank that can be assigned to a player. Each player can only hold one rank at a time. Each rank has a name, a set of permissions, and a set of restrictions on those permissions.
fCraft/System/ConfigKey.cs
Enumeration of available configuration keys. Config.cs contains extension methods for getting/setting keys, resetting key values, and getting key metadata.
fCraft/System/Logger.cs
Central logging class. Logs to file, relays messages to the frontend, submits crash reports.
fCraft/System/Scheduler.cs
A general-purpose task scheduler. Can be used to run tasks at certain times, once or periodically. Usable to offloading intensive tasks to the background.
fCraft/System/Server.cs
Core of an fCraft server. Manages startup/shutdown, online player sessions, and global events and scheduled tasks.
fCraft/World/Block.cs
Enumeration of all standard Minecraft Classic block types.
fCraft/World/Map.cs
Represents a loaded map file. Provides methods to get/set blocks, metadata, and zones.
fCraft/World/World.cs, 'fCraft/World/World.Events.cs
Represents an entry on the world list. May or may not have a map file loaded. Manages players, access/build security, various metadata, flushing, locking, saving and backups.


[edit] Event Sequences

Personal tools
Namespaces
Variants
Actions
Navigation
Toolbox