fCraft.WorldCommands.WorldFlushHandler C# (CSharp) Method

WorldFlushHandler() static private method

static private WorldFlushHandler ( Player player, Command cmd ) : void
player Player
cmd Command
return void
        static void WorldFlushHandler( Player player, Command cmd ) {
            string worldName = cmd.Next();
            World world = player.World;

            if( worldName != null ) {
                world = WorldManager.FindWorldOrPrintMatches( player, worldName );
                if( world == null ) return;

            } else if( world == null ) {
                player.Message( "When using /WFlush from console, you must specify a world name." );
                return;
            }

            Map map = world.Map;
            if( map == null ) {
                player.MessageNow( "WFlush: {0}&S has no updates to process.",
                                   world.ClassyName );
            } else {
                player.MessageNow( "WFlush: Flushing {0}&S ({1} blocks)...",
                                   world.ClassyName,
                                   map.UpdateQueueLength + map.DrawQueueBlockCount );
                world.Flush();
            }
        }

Same methods

WorldCommands::WorldFlushHandler ( Player player, CommandReader cmd ) : void
WorldCommands::WorldFlushHandler ( [ player, [ cmd ) : void