fCraft.Commands.AddCommand C# (CSharp) Method

AddCommand() private method

private AddCommand ( string command, CommandHandler handler, bool isConsoleSafe ) : void
command string
handler CommandHandler
isConsoleSafe bool
return void
        internal void AddCommand( string command, CommandHandler handler, bool isConsoleSafe ) {
            if( isConsoleSafe ) {
                consoleSafeHandlers.Add( command, handler );
            } else {
                handlers.Add( command, handler );
            }
        }

Usage Example

Example #1
0
 internal DrawCommands( World _world, Commands commands ) {
     world = _world;
     commands.AddCommand( "cuboid", Cuboid, true );
     commands.AddCommand( "cub", Cuboid, true );
     commands.AddCommand( "ellipsoid", Ellipsoid, true );
     commands.AddCommand( "ell", Ellipsoid, true );
     commands.AddCommand( "mark", Mark, true );
     commands.AddCommand( "undo", UndoDraw, true );
     commands.AddCommand( "cancel", CancelDraw, true );
 }
All Usage Examples Of fCraft.Commands::AddCommand