static void CutHandler( Player player, Command cmd ) { Block fillBlock = Block.Air; if( cmd.HasNext ) { fillBlock = cmd.NextBlock( player ); if( fillBlock == Block.Undefined ) return; if( cmd.HasNext ) { CdCut.PrintUsage( player ); return; } } CutDrawOperation op = new CutDrawOperation( player ) { Brush = new NormalBrush( fillBlock ) }; player.SelectionStart( 2, DrawOperationCallback, op, Permission.Draw ); if( fillBlock != Block.Air ) { player.Message( "Cut/{0}: Click 2 blocks or use &H/Mark&S to make a selection.", fillBlock ); } else { player.Message( "Cut: Click 2 blocks or use &H/Mark&S to make a selection." ); } }
static void CutHandler( Player player, Command cmd ) { Block fillBlock = Block.Air; if( cmd.HasNext ) { fillBlock = cmd.NextBlock( player ); if( fillBlock == Block.Undefined ) return; if( cmd.HasNext ) { CdCut.PrintUsage( player ); return; } } CutDrawOperation op = new CutDrawOperation( player ) { Brush = new NormalBrush( fillBlock ) }; player.SelectionStart( 2, DrawOperationCallback, op, Permission.Draw ); player.Message( "{0}: Click 2 or &H/Mark&S 2 blocks.", op.Description ); }